-
Notifications
You must be signed in to change notification settings - Fork 356
[StackExchangeRedis] Support Sdk.SuppressInstrumentation. #3372
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3372 +/- ##
==========================================
+ Coverage 70.78% 70.92% +0.14%
==========================================
Files 440 430 -10
Lines 17245 17194 -51
==========================================
- Hits 12207 12195 -12
+ Misses 5038 4999 -39
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| <PackageReference Include="Microsoft.Extensions.Configuration" /> | ||
| <PackageReference Include="Microsoft.Extensions.Options" /> | ||
| <PackageReference Include="OpenTelemetry.Api.ProviderBuilderExtensions" /> | ||
| <PackageReference Include="OpenTelemetry" /> |
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.
I am concerned about this change. During stabilization effort, this package was removed (at least from HttpClient). We still do not have good solution to make similar things referencing only OpenTelemetry/Api package.
@open-telemetry/dotnet-maintainers, do you see any better option here (even long term, by adding this functionality on API level)?
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.
Brought this up at the .NET SIG on Nov 4 2025. Maintainers are looking at moving this functionality out of the SDK package.
Suppression is not currently part of the spec but is useful enough to find a better solution, even though it would technically make the API out of compliance.
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.
@Kielek Use Func<bool> to replace Sdk.SuppressInstrumentatio?
|
I have discussed this problem internally with @pellared. There is another option you can consider and it should met OpenTelemetry design. The correct way to determine if you need to create span is Sampler. You could try to write your own and inject it into the OpenTelemetry tracer. What is more some attributes should be available for Sampler to allow making this decision: What do you think about this solution? Historically, |
|
@Kielek I know Sampler and am already using it, but it’s not suitable for my scenario. |
Fixes #3371
Design discussion issue #
Changes
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes