Developer's Guide - Agent Configuration
In This Topic
The Loupe Agent supports configuration via the Application Configuration file (e.g. app.config or web.config) and at runtime through an Initializing event that is raised when the agent is first invoked. Once the agent has initialized its configuration can't be changed.
Configuring through the Application Configuration file
The agent will always look for an application configuration file (e.g. app.config or web.config) to read its configuration data from whenever it attempts to initialize. This configuration information is used to override the default values that the agent normally operates with.
For complete details on how to configure the agent using the .NET configuration files, see Developer's Guide - Agent Configuration through Configuration Files.
Configuring through environment variables
The agent will look for environment variables and apply them after configuration data loaded from files. This is designed to make it easy to override a few settings on a per-deployment basis by setting environment variables. The general format of the environment variables is the same as the convention in .NET Core / 6 / 8 with two underscores separating each part of the variable path, like this:
Environment Variable Configuration |
Copy Code
|
Loupe__Publisher__EnvironmentName=Testing and Certification
|
Configuring through an external file
Configuration can be stored in a separate Xml file from the application configuration and loaded at runtime. This approach can simplify having shared external Loupe configuration when compared to merging the configuration with the application configuration file.
Configuring through code
You can perform all agent configuration tasks in code with no configuration file being required. This is particularly useful if you want to ship your application as a single file or ensure that end users can't modify the agent configuration.
To see how to configure the agent through code without requiring a configuration file, see Developer's Guide - Agent Configuration through Code.
Common Scenarios
Loupe has an extensive set of configuration options. For a quick overview of some common configurations and purposes, see
Developer's Guide - Agent Configuration Common Scenarios.
See Also