Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.

ref(tracing): Clarify trace context docs #414

Merged
merged 4 commits into from
Aug 27, 2021

Conversation

jan-auer
Copy link
Member

@jan-auer jan-auer commented Aug 26, 2021

Fixes #410

@vercel
Copy link

vercel bot commented Aug 26, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sentry/develop/CRNEL3rhHTGcsp9y5KWTCtXFtbwa
✅ Preview: https://develop-git-ref-improve-trace-context.sentry.dev


This is an extension of trace ID propagation covered by <Link to="/sdk/performance#header-sentry-trace">Performance Guidelines</Link>. According to the Unified API tracing spec, Sentry SDKs add an HTTP header `sentry-trace` to outgoing requests via integrations. Most importantly, this header contains the trace ID, which must match the trace id of the transaction event and also of the trace context below.

The trace context shall be propagated in an additional `tracestate` header defined in [W3C traceparent header](https://www.w3.org/TR/trace-context/#trace-context-http-headers-format). Note that we must keep compatibility with the W3C spec as opposed to the proprietary `sentry-trace` header. The `tracestate` header also contains vendor-specific opaque data in addition to the contents placed by the Sentry SDK.

### Client options

While trace contexts are under development, they should be gated behind an internal `trace_sampling` boolean client option. The option defaults to `false` and should not be documented in Sentry docs.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
While trace contexts are under development, they should be gated behind an internal `trace_sampling` boolean client option. The option defaults to `false` and should not be documented in Sentry docs.
While trace contexts are under development, they should be gated behind an internal `trace_sampling` boolean client option. The option defaults to `false` and should **not** be documented in Sentry docs.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
While trace contexts are under development, they should be gated behind an internal `trace_sampling` boolean client option. The option defaults to `false` and should not be documented in Sentry docs.
While trace contexts are under development, they should be gated behind an **internal** (we plan to remove this option in later versions) `trace_sampling` boolean client option. The option defaults to `false` and should not be documented in Sentry docs.

Comment on lines +183 to +184
##

Copy link
Member

Choose a reason for hiding this comment

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

Is this intentional? It's at the same level as the heading below

Suggested change
##

@bruno-garcia bruno-garcia merged commit 59935e8 into master Aug 27, 2021
@bruno-garcia bruno-garcia deleted the ref/improve-trace-context branch August 27, 2021 19:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarifications for the new trace context spec
2 participants