Chat Support
Loupe - Log - Monitor - Resolve
In This Topic
    Getting Started - Adding Loupe through Manual Configuration
    In This Topic

    Adding the Agent through Configuration

    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. 

    For WinForms applications and windows services the XML configuration file has the name of the executable and the extension .config.  For example, if the application executable is "My.Custom.App.exe" then the configuration file is "My.Custom.App.exe.config".  For ASP.NET web applications it's just web.config.

    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.

    Changing Loupe Agent Options

    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.

    To send data to a Loupe Server you will need to configure the server section at a minimum to indicate the server to communicate with and what session data to send.

    Adding the Loupe Agent Assembly

    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.

    See Also