Sampler tracer integration#128
Merged
Merged
Conversation
added 30 commits
June 17, 2020 02:03
…-cpp into sampling-api-header
…-cpp into sampling-api-header
jsandler18
reviewed
Jun 25, 2020
jsandler18
approved these changes
Jun 25, 2020
oulin-coder
reviewed
Jun 29, 2020
pyohannes
reviewed
Jun 29, 2020
g-easy
reviewed
Jun 30, 2020
| /** | ||
| * @return Description MUST be AlwaysOnSampler | ||
| */ | ||
| std::string GetDescription() const noexcept override { return "AlwaysOnSampler"; } |
Contributor
There was a problem hiding this comment.
If description is always expected to be a string literal, we could return a string_view instead of a std::string.
Contributor
Author
There was a problem hiding this comment.
Agreed. a string_view can be more efficient. I need to open another PR for this issue, since we need to change the data type in multiple header files.
pyohannes
reviewed
Jul 1, 2020
added 2 commits
July 1, 2020 19:53
pyohannes
approved these changes
Jul 2, 2020
Contributor
pyohannes
left a comment
There was a problem hiding this comment.
That looks good.
As discussed, we will integrate the ShouldSample call in a separate PR.
Contributor
Author
|
@reyang Could you please take a look of this PR and merge it? Thank you! |
Member
|
@ziqizh please rebase, thanks. |
Contributor
Author
|
Done. |
Closed
GerHobbelt
pushed a commit
to GerHobbelt/opentelemetry-cpp
that referenced
this pull request
Jun 17, 2025
Update dependency protobuf to v29.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrate sampler into Tracer.
Dependency: Always On Sampler #122 and Always Off Sampler #125
tracer_provider:Implemented the constructor, setter and getter for sampler stored as an
atomic_share_pointer.atomic_share_pointer:Because multiple tracers may share the same sampler. When one program changes the sampler, others might have trouble reading it, creating a race condition.
Note:
atomic_share_pointeronly protects the pointer, but doesn't guarantee the content of the object to be thread safe.Added a reference of the sampler in the Tracer