Skip to content

Configuration

The agent supports 3 methods of configuration:

  • Environment variables
  • IConfiguration
  • ConfigurationManager.AppSettings

The following options are available:

Name Description Env Var IConfiguration/ConfigurationManager
Api Key The authentication token used to authorize the agent NV_API_KEY ApiKey
Name The name of the agent, can be useful to filter to specific agents NV_NAME Name
Tags The tags for the agent, can be useful to filter to specific agents NV_TAGS Tags

IConfiguration

If you are using the IConfiguration format you can pass an IConfiguration object to the agent when you start it:

using Nerd.Vision;

NerdVision.Start(configuration);

Example appsettings.json:

{
    "NerdVision": {
        "ApiKey": "api_key_here",
        "Name": "SampleApplication",
        "Tags": "AppType=Sample,Org=MyOrg"
    }
}

Starting the agent

The agent can be started with either of the following overloads:

using Nerd.Vision;

NerdVision.Start(IConfiguration configuration?);

using Nerd.Vision;

NerdVision.Start(string apiKey, string name?, Dictionary<string, string> tags?, IConfiguration configuration?);
? indicates an optional parameter.