Skip to content
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

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented Jul 16, 2024

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

@mydea mydea self-assigned this Jul 16, 2024
Copy link

vercel bot commented Jul 16, 2024

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

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2024 8:07am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Jul 16, 2024 8:07am

Copy link

codecov bot commented Jul 16, 2024

Bundle Report

Changes will decrease total bundle size by 15 bytes ⬇️

Bundle name Size Change
sentry-docs-server 9.26MB 6 bytes ⬇️
sentry-docs-edge-server 253.22kB 3 bytes ⬇️
sentry-docs-client 7.88MB 6 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
Copy link
Member

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?

Copy link
Member Author

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!

Copy link
Member

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!

@mydea mydea merged commit bffbd87 into master Jul 16, 2024
8 checks passed
@mydea mydea deleted the fn/startSpanParent branch July 16, 2024 11:32
mydea added a commit to getsentry/sentry-javascript that referenced this pull request Jul 16, 2024
…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
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2024
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.

2 participants