Skip to content
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

Use a delegate sampler for each possible case in ParentBased Sampler #1440

Merged
merged 9 commits into from
Dec 4, 2020

Conversation

lzchen
Copy link
Contributor

@lzchen lzchen commented Dec 1, 2020

Fixes #1397

@lzchen lzchen requested review from a team, owais and ocelotl and removed request for a team December 1, 2020 21:05
Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

Looks like you're missing test coverage of passing in a different sampler for the new params

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Just a nit about the tests, otherwise the PR looks.

@@ -329,11 +331,101 @@ def exec_parent_based(self, parent_sampling_context):
self.assertEqual(not_sampled_result.attributes, {})
self.assertEqual(not_sampled_result.trace_state, trace_state)

with parent_sampling_context(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: these tests could be refactored to make them easier, there's a lot of duplicate code here

@lzchen lzchen merged commit 0f8eb6c into open-telemetry:master Dec 4, 2020
@lzchen lzchen deleted the sample branch December 4, 2020 17:51
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.

ParentBased sampler should have delegate samplers for different parent span states
3 participants