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

W3C traceparent #1136

Merged
merged 6 commits into from
Apr 9, 2024
Merged

W3C traceparent #1136

merged 6 commits into from
Apr 9, 2024

Conversation

cleptric
Copy link
Member

@cleptric cleptric commented Jan 19, 2024

@cleptric cleptric self-assigned this Jan 19, 2024
Copy link

vercel bot commented Jan 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
develop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2024 3:22pm

src/docs/sdk/performance/dynamic-sampling-context.mdx Outdated Show resolved Hide resolved
@@ -117,7 +117,8 @@ tree as well as the unit of reporting to Sentry.
- `Span` should have a method `startChild` which creates a new span with the current span's id as the new span's `parentSpanId` and the current span's `sampled` value copied over to the new span's `sampled` property
- The `startChild` method should respect the `maxSpans` limit, and once the limit is reached the SDK should not create new child spans for the given transaction.
- `Span` should have a method called `toSentryTrace` which returns a string that could be sent as a header called `sentry-trace`.
- `Span` should have a method called `iterHeaders` (adapt to platform's naming conventions) that returns an iterable or map of header names and values. This is a thin wrapper containing `return {"sentry-trace": toSentryTrace()}` right now. See `continueFromHeaders` as to why this exists and should be preferred when writing integrations.
- `Span` should have a method called `toW3CTrace` which returns a string that could be sent as a header called `traceparent`.
Copy link
Member

@Lms24 Lms24 Apr 9, 2024

Choose a reason for hiding this comment

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

side note: These docs here assume our SDKs create spans themselves. This is no longer the case in Otel-based SDKs (e.g. JS Node), so we can't define most of these methods on a span/transaction interface. Instead we expose top level helper functions in JS. I think it's fine to keep things as-is in this PR but we probably wanna rework this page a bit to keep things up to date.

src/docs/sdk/performance/index.mdx Outdated Show resolved Hide resolved
src/docs/sdk/performance/index.mdx Show resolved Hide resolved
@cleptric cleptric enabled auto-merge (squash) April 9, 2024 15:19
@cleptric cleptric merged commit 1a841fd into master Apr 9, 2024
4 of 5 checks passed
@cleptric cleptric deleted the traceparent branch April 9, 2024 15:21
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.

4 participants