-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use IExternalScopeProvider for logging scopes #54
Comments
Hi, apologies for the delay getting back to you. This looks useful, thanks. If you would like support added sooner rather than later feel free to put up a pull request, otherwise I'll take a look when I have some time. |
Just for reference: this relates to getting SpanId, TraceId, ParentId fields in your logs. |
FYI Probably it should be possible to fake it with approach from serilog/serilog-aspnetcore#207 (comment) and adding mentioned field in when AdditionalFieldsFactory() is called. |
I finally got around to adding support for this, use v2.3.0-pre2 to give it a try. |
The default logger factory can provide a scope implementation via the
ISupportExternalScope
andIExternalScopeProvider
interfaces.For reference, see:
Microsoft.Extensions.Logging/LoggerFactory.cs and Microsoft.Extensions.Logging/LoggerFactoryScopeProvider.cs
This gets you features like dotnet/runtime#34305 when using the default logger factory instance.
Can support be added for
ISupportExternalScope
andIExternalScopeProvider
?The text was updated successfully, but these errors were encountered: