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

Initial support for Trace-flags #868

Merged
merged 7 commits into from
Jun 7, 2024
Merged

Conversation

RonFed
Copy link
Contributor

@RonFed RonFed commented Jun 3, 2024

The main goal of this PR is to add support for the trace-flags field in span context, specifically the sampled flag.
The current state is that we are not checking this flag. For example we can create an HTTP server span without any visible parent (since the parent in some remote service was configured to not sample), this change will avoid passing the HTTP server from the probe to user space if the sampled flag is off.
Introduce 2 functions which are commonly used and will reduce duplication between the probes:

  • get_span_context_from_parent
  • get_root_span_context

Currently, I added the check for is_sampled only in the http server probe, and plan to add it in the other probes in a future PR.

@RonFed RonFed marked this pull request as ready for review June 5, 2024 11:41
@RonFed RonFed requested a review from a team June 5, 2024 11:41
@MrAlias MrAlias merged commit 3346339 into open-telemetry:main Jun 7, 2024
17 checks passed
@MrAlias MrAlias mentioned this pull request Jul 15, 2024
@MrAlias MrAlias added this to the v0.14.0-alpha milestone Jul 15, 2024
@RonFed RonFed mentioned this pull request Jul 16, 2024
7 tasks
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.

3 participants