Closed kanadaj closed 5 months ago
Ah actually DataDog's own C# pipeline should be responsible for this... I think my data might be lacking a flag for the filter...
Apparently this is happening because by default the Newtonsoft.Json serializer uses pascal case instead of camel case, so the resulting exception attribute is Exception
, not exception
. Datadog's default C# pipeline is case sensitive and defines exception with a lower e.
Apparently this is happening because by default the Newtonsoft.Json serializer uses pascal case instead of camel case, so the resulting exception attribute is
Exception
, notexception
. Datadog's default C# pipeline is case sensitive and defines exception with a lower e.
Hi, did you find any way to solve this?
Newtonsoft.Json
has been removed since 0.4.0
and we have added the ability to fully customize the emitted logs. Let me know if this helps with your problem.
I think so, but shouldn't this work by default? Maybe I'm doing something wrong, but I feel that the sink should already do this
The default C# pipeline appears to capture both Exception
and exception
now. I'll close this, but let me know if it is insufficient for your needs.
According to the datadog documentation (https://docs.datadoghq.com/logs/log_collection/?tab=http#how-to-get-the-most-of-your-application-logs) DataDog has the designated
error.stack
property for stacktraces along witherror.message
for the exception message, however the serilog logger does not remap to this field automatically. Since Serilog may be used to write to multiple sinks at the same time, it's undesirable to do this mapping in the Enrich pipeline since that would affect the other sinks as well, so the sink itself should be doing this conversion.