-
Notifications
You must be signed in to change notification settings - Fork 780
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
Attempt to reduce provider lifetime issues #2848
Attempt to reduce provider lifetime issues #2848
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report
@@ Coverage Diff @@
## main #2848 +/- ##
==========================================
- Coverage 83.91% 83.74% -0.18%
==========================================
Files 250 250
Lines 8877 8882 +5
==========================================
- Hits 7449 7438 -11
- Misses 1428 1444 +16
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Late to the 🎉, but LGTM.
An additional thought might be to include some lifetime guidance in some of the XML comments. Maybe on the Create*ProviderBuilder
methods? https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry/Sdk.cs#L57-L74
I could take a stab...
Yes please! |
Have seen users not managing the provider lifetime correctly. Partly because of copy-paste from console example: https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/metrics/getting-started/Program.cs#L28, to other workloads like ASP.NET, without changes.
This also adds a log, so self-diag can offer some hints about the issue, in some situations.