Skip to content

Update Sampler interface base on OTEP 0006-sampling#296

Merged
SergeyKanzhelev merged 7 commits intoopen-telemetry:masterfrom
bogdandrutu:sampler
Oct 15, 2019
Merged

Update Sampler interface base on OTEP 0006-sampling#296
SergeyKanzhelev merged 7 commits intoopen-telemetry:masterfrom
bogdandrutu:sampler

Conversation

@bogdandrutu
Copy link
Copy Markdown
Member

@bogdandrutu bogdandrutu commented Oct 10, 2019

Fixes #87
Fixes #33

Copy link
Copy Markdown
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments


Returns the sampling Decision for a `Span` to be created.

**Required arguments:**
Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member Author

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>
@bogdandrutu bogdandrutu added this to the Alpha v0.2 milestone Oct 14, 2019
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
Copy link
Copy Markdown
Contributor

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 ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess not?

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#314 done!

Copy link
Copy Markdown
Member

@SergeyKanzhelev SergeyKanzhelev left a 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

bogdandrutu and others added 5 commits October 15, 2019 08:10
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>
@bogdandrutu
Copy link
Copy Markdown
Member Author

@yurishkuro please take another look.

@SergeyKanzhelev
Copy link
Copy Markdown
Member

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

@SergeyKanzhelev SergeyKanzhelev merged commit f1c4f68 into open-telemetry:master Oct 15, 2019
SergeyKanzhelev added a commit to SergeyKanzhelev/opentelemetry-specification that referenced this pull request Feb 18, 2020
* 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>
TuckTuckFloof pushed a commit to TuckTuckFloof/opentelemetry-specification that referenced this pull request Oct 15, 2020
@bogdandrutu bogdandrutu deleted the sampler branch February 11, 2021 16:38
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
* 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>
schmikei pushed a commit to schmikei/opentelemetry-specification that referenced this pull request Apr 17, 2025
Co-authored-by: Joao Grassi <joao.grassi@dynatrace.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API: Provided Samplers in the SDK Document that default sampler is 100% sampler

5 participants