apm-agent-dotnet
apm-agent-dotnet copied to clipboard
Make sure the service.environment is always set
- When
Microsoft.Extensions.Configuration.IConfiguration
is passed (e.g. ASP.NET Core) we readbuilder.ApplicationServices.GetEnvironmentName()
- On ASP.NET classic we actually pass
null
- The
EnvironmentConfigurationReader
(which is the default one if you don't configure the agent) also returnsnull
.
Task:
- make sure
service.environment
is always set to a default, which isproduction
- make sure this is also covered in the docs.
To resolve this, should
-
FullFrameworkConfigReader
pass a value ofproduction
fordefaultEnvironmentName
in the call to the base ctor?
or
-
AbstractConfigurationReader
returnproduction
whenkv
insideParseEnvironment
isnull
(which would be inherited byEnvironmentConfigurationReader
) ?