Skip to content
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

No documentation on how to use an external scope provider when logging #40763

Open
BonnieSoftware opened this issue May 5, 2024 · 0 comments
Labels
dotnet-fundamentals/svc Pri1 High priority, do before Pri2 and Pri3 ⌚ Not Triaged Not triaged

Comments

@BonnieSoftware
Copy link

BonnieSoftware commented May 5, 2024

Type of issue

Missing information

Description

I can see by looking at the source code that there is support to use an external scope provider:

  • IExternalScopeProvider
  • ISupportExternalScope

As a side note, the following is not helpful (comment taken from within the IExternalScopeProvider source code itself)...
"Represents a storage of common scope data."

There are no docs on what this mysterious feature is or how to use it. Some people have managed to decipher it enough to use it as there are issues in github relating to not being able to pass in a scope provider to some log providers, but a quick google reveals not much is said on the topic.

This is what ChatGPT has to say on it:

Implement the IExternalScopeProvider Interface: Create a class that implements the IExternalScopeProvider interface. This interface includes methods for pushing and popping scopes and for setting the scope provider for the logging framework.

What a developer would mainly be interested in here is what is the reason for using an external scope provider over the out-of-the-box functionality and how would they go about doing so?

Page URL

https://learn.microsoft.com/en-us/dotnet/core/extensions/logging?tabs=command-line

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/extensions/logging.md

Document Version Independent Id

0e787ac2-1108-1d94-d62f-ccffa93e06c3

Article author

@IEvangelist

Metadata

  • ID: 346bbcf3-9f8e-b253-09fe-906195392783
  • Service: dotnet-fundamentals
@issues-automation issues-automation bot added dotnet-fundamentals/svc Pri1 High priority, do before Pri2 and Pri3 labels May 5, 2024
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fundamentals/svc Pri1 High priority, do before Pri2 and Pri3 ⌚ Not Triaged Not triaged
Projects
None yet
Development

No branches or pull requests

2 participants