-
Notifications
You must be signed in to change notification settings - Fork 901
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
Update Sampler interface base on OTEP 0006-sampling #296
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.
see comments
sampling `Decision` based on information that is typically available just before | ||
the `Span` was created. | ||
sampling `SamplingResult` based on information that is typically available just | ||
before the `Span` was created. | ||
|
||
#### ShouldSample | ||
|
||
Returns the sampling Decision for a `Span` to be created. | ||
|
||
**Required arguments:** |
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.
Would it make sense to generalize this, in light of #31? In Jaeger we recently extended the API to allow sampling decisions to be made later in the span life cycle
onCreateSpan(span: Span): SamplingDecision
onSetOperationName(span: Span, operationName: string): SamplingDecision
onSetTag(span: Span, key: string, value: any): SamplingDecision
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 think these are moments when the Sampler is called from the SDK perspective. I do agree that this is a nice to have config. Filed #307
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
arguments collection. Description MUST be `NeverSampleSampler`. | ||
These are the default samplers implemented in the OpenTelemetry SDK: | ||
|
||
* ALWAYS_ON |
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.
IMO, this isn't a particularly clear name. Can we make it ALWAYS_RETAIN
and the other be ALWAYS_DROP
?
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 guess not?
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.
Please file an issue to not forget about this.
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.
#314 done!
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.
please apply suggested changes
Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com>
Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com>
Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com>
Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com>
@yurishkuro please take another look. |
This change was discussed in OTEP and hasn't received any requests for change. It also satisfied the requirement on # of approvals and almost a day passed since the last approval. No semantics changes were made in 5 days. So looks OK to merge for me. Merging |
* Update Sampler interface base on OTEP 0006-sampling Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Fix comments from review Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Update specification/sdk-tracing.md Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com> * Update specification/sdk-tracing.md Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com> * Update specification/sdk-tracing.md Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com> * Update specification/sdk-tracing.md Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com>
* Update Sampler interface base on OTEP 0006-sampling Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Fix comments from review Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Update specification/sdk-tracing.md Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com> * Update specification/sdk-tracing.md Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com> * Update specification/sdk-tracing.md Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com> * Update specification/sdk-tracing.md Co-Authored-By: Sergey Kanzhelev <S.Kanzhelev@live.com>
Fixes #87
Fixes #33