on-internet
← Community

ASP.NET Core Serilog logging in a Docker container is missing TraceId and SpanId results

Stack Overflow ·

I have an ASP.NET Core application running inside a Docker container. I use Serilog as the logging provider behind the Microsoft.Extensions.Logging (ILogger) abstraction. I’ve noticed a strange behavior when running the application inside versus outside Docker. When I run the app locally or behind IIS, the logs contain TraceId, SpanId, and RequestId (as a GUID). However, when I run the application inside Docker, the first two disappear from the logs, and the RequestId has a different format (I know this depends on Kestrel). The configuration is the same in both cases, but I can’t understand wh

Comments

Sign in or sign up to comment and upvote.

No comments yet.