-
Notifications
You must be signed in to change notification settings - Fork 859
Added AlwaysRecordSampler #6732
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
0a732aa to
8be4c06
Compare
Kielek
left a comment
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.
Request change to avoid incidental merge.
For now, it is a specification proposal, it means we are not able to merge it even to the unstable releases.
If accepted as a development, needs to follow comments from #6617 (comment)
8be4c06 to
f912bdf
Compare
|
@Kielek spec PR is merged, ready for review! |
Would it be easier to host this in https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Extensions given this is a somewhat standalone component (a sampler) ? Once spec is stable, it can be moved to main repo. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6732 +/- ##
==========================================
+ Coverage 86.85% 86.86% +0.01%
==========================================
Files 258 259 +1
Lines 11990 12001 +11
==========================================
+ Hits 10414 10425 +11
Misses 1576 1576
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Kielek
left a comment
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.
Couple of suggestions.
The idea adding to OpenTelemetry.Extension is worth to consider, but I would not block adding it also here. Without stabilizing specification it will be barely usable by the normal OpenTelemetry SDK users.
| * Added support for `Meter.TelemetrySchemaUrl` property. | ||
| ([#6714](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6714)) | ||
|
|
||
| * Added `AlwaysRecordSampler`. |
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.
| * Added `AlwaysRecordSampler`. | |
| * **Experimental (pre-release builds only):** Added `AlwaysRecordSampler`. |
|
|
||
| #### AlwaysRecordSampler | ||
|
|
||
| TODO: Explanation. |
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.
Needs some real data here.
| Guard.ThrowIfNull(rootSampler); | ||
| return new AlwaysRecordSampler(rootSampler); |
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.
The same problem we have in the ParentBasedSample
| Guard.ThrowIfNull(rootSampler); | |
| return new AlwaysRecordSampler(rootSampler); | |
| Guard.ThrowIfNull(rootSampler); | |
| #pragma warning disable CA1062 // Validate arguments of public methods - needed for netstandard2.1 | |
| return new AlwaysRecordSampler(rootSampler); | |
| #pragma warning restore CA1062 // Validate arguments of public methods - needed for netstandard2.1 |
That made me realize one thing - there is no document on how to enable experimental features. Keeping in |
|
I agree with @cijothomas that it's too soon to include this in the SDK given the current status of the spec. I recommend adding it to OpenTelemetry.Extensions. |
Background
Spec PR: open-telemetry/opentelemetry-specification#4699
Design discussion issue open-telemetry/opentelemetry-specification#4698
Changes
Changes copied from the following with some modifications: aws-otel-dotnet-instrumentation
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes