apm-agent-dotnet
apm-agent-dotnet copied to clipboard
Make sure the service.environment is always set
- When
Microsoft.Extensions.Configuration.IConfigurationis 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.environmentis always set to a default, which isproduction - make sure this is also covered in the docs.
To resolve this, should
FullFrameworkConfigReaderpass a value ofproductionfordefaultEnvironmentNamein the call to the base ctor?
or
AbstractConfigurationReaderreturnproductionwhenkvinsideParseEnvironmentisnull(which would be inherited byEnvironmentConfigurationReader) ?