Replies: 1 comment 1 reply
-
I'm not really sure. I vaguely remember reading that there is some sort of dependency on .NET 5 but I can't remember off hand. Could you try debugging it and seeing what happens? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Hello.
From my understanding this package was created because System.Diagnostincs.Activity related information was made optional for .NET 5, but was included by default in lower versions.
Currently I would like to manually create an Activity and have TraceId, SpanId, etc included into consequent log entries.
Something like this:
This code is outside of request pipeline, and .NET Core 3.1 logs are not enriched.
But if I migrate project to .NET 5 and add Span enricher, everything is included and works exactly as I need.
Could you please advise if there is a way to achieve the ".NET 5 + enricher" behaviour in .NET Core 3.1?
I assume the most straightforward way would be to manually "BeginScope" with all necessary information after the creation of Activity object, but maybe you are aware of better way.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions