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

Conversation

@HazAT
Copy link
Member

@HazAT HazAT commented Sep 22, 2020

This came up in this PR and in Discord
getsentry/sentry-php#1092

We should document to have this.

@HazAT HazAT requested a review from rhcarvalho September 22, 2020 13:40
@HazAT HazAT self-assigned this Sep 22, 2020
@vercel
Copy link

vercel bot commented Sep 22, 2020

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/gyc6hp2qx/sentry.dev
✅ Preview: https://develop-git-feat-tracing-docs.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
Copy link
Contributor

Choose a reason for hiding this comment

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

  • SpanContext is an implementation detail, as indicated above, so I'd not define required methods on it. from/toTraceparent should be in Span and Transaction. JS defines both methods on Span and they are inherited by Transaction.
  • We need to document the format of the string used for the sentry-trace header.

Copy link
Member Author

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>
Copy link
Contributor

@rhcarvalho rhcarvalho left a 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 :)

@HazAT HazAT merged commit 8801ca0 into master Sep 24, 2020
@HazAT HazAT deleted the feat/tracing-docs branch September 24, 2020 10:44
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.

3 participants