It looks like the Serilog Sink does not read configuration values from this file. For example the Service name is not appearing in the logs recorded by datadog.
I'm using code first approach to provide the API key because we don't want to log out development environment so we leave the key blank until deployed. If you have a blank key by default it throws an exception
var ddApiKey = context.Configuration.GetValue<string>("DD_API_KEY");
if (!string.IsNullOrWhiteSpace(ddApiKey))
loggerConfig.WriteTo.DatadogLogs(ddApiKey, logLevel:LogEventLevel.Debug);
I noticed the ConfigurationSection property but this would require a sub section of your json file like
The APM setup for Datadog's Asp.net core integration suggests that it should be configured using datadog.json.
It looks like the Serilog Sink does not read configuration values from this file. For example the Service name is not appearing in the logs recorded by datadog.
I'm using code first approach to provide the API key because we don't want to log out development environment so we leave the key blank until deployed. If you have a blank key by default it throws an exception
I noticed the ConfigurationSection property but this would require a sub section of your json file like
is datadog.json config file supported?