open-telemetry / opentelemetry-dotnet

The OpenTelemetry .NET Client
https://opentelemetry.io
Apache License 2.0
3.23k stars 765 forks source link

Log message is not formatted #5773

Closed mkeymolen closed 3 months ago

mkeymolen commented 3 months ago

What is the question?

Hi, i have a small issue with using OTEL to send my logs from a dotnet(8.0) application to ELK . Everything works fine, the traces and the logs are correlated, but the message is not formatted correctly.. however, the attributes are added correctly, it is only the string of the message which is not correctly formatted and still shows the attribute names instead of the values: Example of the message value:

[Information] Request starting {Protocol} {Method} {Scheme}://{Host}{PathBase}{Path}{QueryString} - {ContentType} {ContentLength}

Any ideas?

Additional context

No response

cijothomas commented 3 months ago

https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/docs/logs/customizing-the-sdk#includeformattedmessage Can you enable this and see if that is what you are looking for?

mkeymolen commented 3 months ago

This works, thanks!