-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(js): Add docs for creating a child span #10729
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Bundle ReportChanges will decrease total bundle size by 15 bytes ⬇️
|
@@ -101,6 +102,20 @@ To add spans that aren't active, you can create independent spans. This is usefu | |||
|
|||
<PlatformContent includePath="performance/start-inactive-span" /> | |||
|
|||
## Starting Spans as Children of a Specific Span |
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.
Are we guarding this paragraph for node guides? AFAIK this won't work in browser SDK where we have a flat span hierarchy, right?
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.
hmm, good point, I mean it will kind of work, if the span is a root span for example. I would leave this as is for now, we can maybe clarify this even further if needed!
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.
ok sounds good to me!
…n*` (#12928) Noticed this while writing docs, this makes this a bit harder to understand. With this change you can say that `parentSpan` behaves the same and accepts the same as `withActiveSpan`. See getsentry/sentry-docs#10729
This adds docs for the
parentSpan
option we added somewhat recently to the SDK, which should make it easier to understand. It also adds a dedicated section to custom instrumentation docs to explain this, as it is a rather common scenario.Ref getsentry/sentry-javascript#12928