Skip to content

Change should_sample parameters to be spec compliant#1764

Merged
lzchen merged 9 commits intoopen-telemetry:mainfrom
lzchen:sample
Apr 15, 2021
Merged

Change should_sample parameters to be spec compliant#1764
lzchen merged 9 commits intoopen-telemetry:mainfrom
lzchen:sample

Conversation

@lzchen
Copy link
Copy Markdown
Contributor

@lzchen lzchen commented Apr 12, 2021

Fixes #1763

  1. Adds SpanKind to should_sample
  2. should_sample uses trace_state from the passed in Context 's SpanContext 's TraceState instead of the explicitly passed in TraceState.

@lzchen lzchen requested review from a team, codeboten and owais and removed request for a team April 12, 2021 19:34
Copy link
Copy Markdown
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

Shouldn't we also update the should_sample to take trace_state from parent_context?

@lzchen
Copy link
Copy Markdown
Contributor Author

lzchen commented Apr 13, 2021

@lonewolf3739
I believe we already do that here

@lzchen lzchen requested a review from srikanthccv April 13, 2021 15:03
@srikanthccv
Copy link
Copy Markdown
Member

Does it make sense to move that to should_sample and add a note saying that is the recommended way and discourage people from using trace_state param?

@lzchen
Copy link
Copy Markdown
Contributor Author

lzchen commented Apr 13, 2021

@lonewolf3739

Does it make sense to move that to should_sample and add a note saying that is the recommended way and discourage people from using trace_state param?

This makes sense. I'll make these changes.

@lzchen lzchen requested review from codeboten and owais April 14, 2021 17:45
@lzchen
Copy link
Copy Markdown
Contributor Author

lzchen commented Apr 14, 2021

@lonewolf3739
Please take a look.

@lzchen lzchen changed the title Add SpanKind to should_sample Change should_sample parameters to be spec compliant Apr 14, 2021
Copy link
Copy Markdown
Contributor

@ocelotl ocelotl left a comment

Choose a reason for hiding this comment

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

Approving, there is mostly a minor fix in documentation suggested.

@lzchen lzchen merged commit 71e3a7a into open-telemetry:main Apr 15, 2021
@lzchen lzchen deleted the sample branch April 15, 2021 15:00
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.

Discrepancy between spec and sdk implementation of should_sample

5 participants