You can add the Loupe Agent to an existing application by registering it in the App.Config XML file. Each application has an XML configuration file that is used to hold options that can be changed without recompiling the application. These options apply to all users of the application.
To register the agent you will need to add the following to your configuration file:
Loupe Application Configuration Registration |
Copy Code
|
---|---|
<?xml version="1.0" encoding="utf-8" ?> <configuration> <!-- You may already have a <configSections> section in your configuration file, If this is the case, add the inner content <sectionGroup>...</sectionGroup> to the file --> <configSections> <sectionGroup name="gibraltar"> <section name="listener" type="Gibraltar.Agent.ListenerElement, Gibraltar.Agent" /> <section name="packager" type="Gibraltar.Agent.PackagerElement, Gibraltar.Agent" /> <section name="publisher" type="Gibraltar.Agent.PublisherElement, Gibraltar.Agent" /> <section name="sessionFile" type="Gibraltar.Agent.SessionFileElement, Gibraltar.Agent" /> <section name="viewer" type="Gibraltar.Agent.ViewerElement, Gibraltar.Agent" /> <section name="email" type="Gibraltar.Agent.EmailElement, Gibraltar.Agent" /> <section name="server" type="Gibraltar.Agent.ServerElement, Gibraltar.Agent" /> <section name="autoSendConsent" type="Gibraltar.Agent.AutoSendConsentElement, Gibraltar.Agent" /> <section name="networkViewer" type="Gibraltar.Agent.NetworkViewerElement, Gibraltar.Agent" /> <section name="properties" type="System.Configuration.NameValueSectionHandler" /> </sectionGroup> </configSections> <!-- You may already have a <system.diagnostics> section in your configuration file, possibly also including the <trace> and <listeners> tags. If this is the case, you only need to add the line that starts <add name="gibraltar" ... /> to the file --> <system.diagnostics> <trace> <listeners> <add name="gibraltar" type="Gibraltar.Agent.LogListener, Gibraltar.Agent"/> </listeners> </trace> </system.diagnostics> </configuration> |
If you are using a third party log system it may have additional requirements for integration. For more information see Developer's Guide - Third Party Integration - Introduction.
For a complete set of configuration options and how to add them to your application configuration, see Developer's Guide - Agent Configuration through Configuration Files. The default options are designed to work best in most scenarios, but for ideas on typical configurations see Developer's Guide - Agent Configuration Common Scenarios.
Once you've added the information above to your configuration file you will need to ensure that the Loupe Agent (Gibraltar.Agent.dll) is available to the application. The Loupe Agent is available on NuGet. See Developer's Guide - Deployment for information on exactly what file(s) should be deployed in your specific situation.