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

traceparent header missing trace-flags #1711

Closed
benjaminrigaud opened this issue Mar 7, 2024 · 2 comments · Fixed by #1713
Closed

traceparent header missing trace-flags #1711

benjaminrigaud opened this issue Mar 7, 2024 · 2 comments · Fixed by #1713
Assignees

Comments

@benjaminrigaud
Copy link

How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

4.4.0+

Steps to reproduce

  • Receiving API requests from partners using Sentry PHP SDK
    • These requests contains an incomplete traceparent header like: 00-f3e67297c2a2426c93e9453af787103d-58738da11f564cf4
  • ddtrace is unable to parse this traceparent and is logging an error that gets reported to our Sentry ♻️

These errors appeared at the start of February: one week after the Sentry PHP SDK 4.4.0 release that introduced the support for traceparent header.

Expected result

Valid traceparent headers: 00-f3e67297c2a2426c93e9453af787103d-58738da11f564cf4-{XX}

Actual result

Invalid traceparent header: 00-f3e67297c2a2426c93e9453af787103d-58738da11f564cf4

It is missing the trace-flags part at the end.
https://www.w3.org/TR/trace-context/#examples-of-http-traceparent-headers

Is it coming from PropagationContext::toW3CTraceparent?

https://github.com/getsentry/sentry-php/pull/1680/files#diff-409ef5376d2e7e91792b0d68cac9d9f8dd1d078d25346e63462a652d789adf9bR73

@cleptric
Copy link
Member

cleptric commented Mar 8, 2024

I was under the impression that the sampled flag was optional to delegate the sampling decision to the receiving service. But I was wrong, it will be fixed in #1713.

@cleptric
Copy link
Member

cleptric commented Mar 8, 2024

Fixed in 4.6.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants