You can customize the agent behaviour through .NET environment options.
Configurations
You can set following configurations in the .NET agent.
Option | Description | Type |
---|---|---|
LicenseKey | APM License Key of your account. | string |
AppName | Name of your Go project/app. | string |
Analytics | Flag to enable/disable app analytics. | boolen |
CaptureBody | Flag to capture request body and response body in analytics. | string |
LogLevel | Sets the logging level for the agent. This option is case-insensitive. | string |
All above configurations will set your environment as follows.
export ATATUS_LICENSE_KEY="ATATUS_LICENSE_KEY"
export ATATUS_APP_NAME=".NET App"
export ATATUS_ANALYTICS="true"
export ATATUS_CAPTURE_BODY="all"
export ATATUS_LOG_LEVEL="debug"
Setting analytics
App Analytics collects all requests individually with contextual data.
In Web.config file:
<!-- Web.config /> -->
<add key="Atatus:AppName" value="YOUR_APP_NAME" />
<add key="Atatus:LicenseKey" value="YOUR_LICENSE_KEY" />
<add key="Atatus:Analytics" value="true" />
In appssettings.json file:
// appssettings.json
"Atatus": {
"AppName": "YOUR_APP_NAME",
"LicenseKey": "YOUR_LICENSE_KEY",
"Analytics": true
}
In Environment:
# Environment
export ATATUS_ANALYTICS="true"
Setting captureBody
By default Analytics don't capture request and response body. If you want capture request body, you can enable below options in Atatus initialization. This option is only applicable to Analytics, not for APM.
In Web.config file:
<!-- Web.config /> -->
<add key="Atatus:AppName" value="YOUR_APP_NAME" />
<add key="Atatus:LicenseKey" value="YOUR_LICENSE_KEY" />
<add key="Atatus:Analytics" value="true" />
<add key="Atatus:CaptureBody" value="all" />
In appssettings.json file:
// appssettings.json
"Atatus": {
"AppName": "YOUR_APP_NAME",
"LicenseKey": "YOUR_LICENSE_KEY",
"Analytics": true,
"CaptureBody": "all"
}
In Environment:
# Environment
export ATATUS_ANALYTICS="true"
export ATATUS_CAPTURE_BODY="all"
Enable debug log level
In case if you are facing any issues with .NET APM (Example: no data is coming, crashing the server, etc), you can enable the debug log level and log path in env options then send the logs to success@atatus.com. The available log levels are Error
, Warning
, Information
, Debug
.
In Web.config file:
<!-- Web.config /> -->
<add key="Atatus:AppName" value="YOUR_APP_NAME" />
<add key="Atatus:LicenseKey" value="YOUR_LICENSE_KEY" />
<add key="Atatus:LogLevel" value="Debug" />
In appssettings.json file:
// appssettings.json
"Atatus": {
"AppName": "YOUR_APP_NAME",
"LicenseKey": "YOUR_LICENSE_KEY",
"LogLevel": "Debug"
}
In Environment:
# Environment
export ATATUS_LOG_LEVEL="Debug"