Open rafaelpadovezi opened 1 year ago
Hi, you can avoid this behavior changing the default value for propertiesPrefix = ""
at the Dynatrace
method extension. Example:
var log = new LoggerConfiguration()
.WriteTo.Dynatrace(
accessToken: "xxx.yyyyyy.zzzzz",
ingestUrl: "https://{your-environment-id}.live.dynatrace.com/api/v2/logs/ingest",
propertiesPrefix: "")
.CreateLogger();
Thanks @iojancode. I would like to add a prefix to the other properties but it's not required. I will follow this recommendation
i will leave this one tagged as question for other users
Added a PR that should make that work out of the box.
Hey, I'm trying to send logs to Dynatrace using this Sink and stumbled in this behavior. My OneAgent is configured to automatic enrich the app logs. The result is that the log event is showing in Dynatrace with the
attr
prefix to the field:This way Dynatrace is not relating the logs with the application. Could this property be a ROOT_PROPERTY? https://github.com/iojancode/Serilog.Sinks.Dynatrace/blob/69d22fdc38d612a710c47380d21764a07ca97945/DynatraceTextFormatter.cs#L14
Or maybe anything that starts with
dt.
should not have the prefix. Do you think it makes sense?