-
-
Notifications
You must be signed in to change notification settings - Fork 219
feat: Add from/to traceparent #147
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sentry/develop/gyc6hp2qx/sentry.dev |
| - `SpanContext` is the attribute collection for a `Span` (Can be an implementation detail) | ||
| - The relation between parent - child is captured in the property `parentSpanId` | ||
| - `Span` should have a method called `toTraceparent` which returns a string `sentry-trace` that could be sent as a header | ||
| - Similar `SpanContext` should have a static method called `fromTraceparent` which prefills a `SpanContext` with data received from a `sentry-trace` string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SpanContextis an implementation detail, as indicated above, so I'd not define required methods on it.from/toTraceparentshould be inSpanandTransaction. JS defines both methods onSpanand they are inherited byTransaction.- We need to document the format of the string used for the
sentry-traceheader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say SpanContext while implementation detail we can come with an opinion to have this there.
Co-authored-by: Rodolfo Carvalho <rodolfo.carvalho@sentry.io>
rhcarvalho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for filling in the gaps :)
This came up in this PR and in Discord
getsentry/sentry-php#1092
We should document to have this.