GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(core): Add `parentSpan` option to `startSpan*` APIs by mydea · Pull Request #12567 · getsentry/sentry-javascript

Conversation

@mydea

@mydea mydea commented Jun 19, 2024

Copy link
Copy Markdown
Member

With this PR, you can now pass a parentSpan optionally to startSpan* APIs to create a span as a child of a specific span:

const span = Sentry.startInactiveSpan({ name: 'xxx', parentSpan: parent });

Sentry.startSpan({ name: 'xxx', parentSpan: parent }, () => {});

Sentry.startSpanManual({ name: 'xxx', parentSpan: parent }, () => {});

With this, it should be easier to understand how you can manually work with spans in v8.

Closes #12539

ref #12566, which I noticed while working on this. For now I just cast the span which should be fine, but is not ideal.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mydea
feat(core): Add parentSpan option to startSpan* APIs
772fdac
@mydea
mydea requested review from AbhiPrasad and lforst June 19, 2024 14:56
@mydea mydea self-assigned this Jun 19, 2024
AbhiPrasad
AbhiPrasad approved these changes Jun 19, 2024
View reviewed changes
@github-actions

github-actions Bot commented Jun 19, 2024

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@sentry/browser 22.22 KB (0%)
@sentry/browser (incl. Tracing) 33.31 KB (+0.11% 🔺)
@sentry/browser (incl. Tracing, Replay) 69.09 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.41 KB (+0.07% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.14 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 85.31 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 87.17 KB (+0.09% 🔺)
@sentry/browser (incl. metrics) 26.5 KB (+0.29% 🔺)
@sentry/browser (incl. Feedback) 38.42 KB (0%)
@sentry/browser (incl. sendFeedback) 26.85 KB (0%)
@sentry/browser (incl. FeedbackAsync) 31.42 KB (0%)
@sentry/react 24.96 KB (0%)
@sentry/react (incl. Tracing) 36.35 KB (+0.1% 🔺)
@sentry/vue 26.32 KB (+0.37% 🔺)
@sentry/vue (incl. Tracing) 35.16 KB (+0.09% 🔺)
@sentry/svelte 22.35 KB (0%)
CDN Bundle 23.41 KB (0%)
CDN Bundle (incl. Tracing) 35.04 KB (+0.27% 🔺)
CDN Bundle (incl. Tracing, Replay) 69.17 KB (+0.14% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.34 KB (+0.12% 🔺)
CDN Bundle - uncompressed 68.76 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 103.61 KB (+0.2% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 214.08 KB (+0.1% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 226.67 KB (+0.09% 🔺)
@sentry/nextjs (client) 36.23 KB (+0.1% 🔺)
@sentry/sveltekit (client) 33.95 KB (+0.14% 🔺)
@sentry/node 112.98 KB (+0.04% 🔺)
@sentry/node - without tracing 90.39 KB (+0.05% 🔺)
@sentry/aws-serverless 99.48 KB (+0.05% 🔺)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mydea
mydea merged commit 0019309 into develop Jun 20, 2024
@mydea
mydea deleted the fn/startSpanParent branch June 20, 2024 12:46
AbhiPrasad added a commit that referenced this pull request Jun 20, 2024
@AbhiPrasad
Revert "feat(core): Add parentSpan option to startSpan* APIs (#12567
368bfaa
)"

This reverts commit 0019309.
@AbhiPrasad AbhiPrasad mentioned this pull request Jun 20, 2024
Revert "feat(core): Add parentSpan option to startSpan* APIs" #12587
Closed
@FengShangWuQi FengShangWuQi mentioned this pull request Jul 14, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.11.0 FengShangWuQi/fengshangwuqi.github.io#1908
Closed
@q1blue q1blue mentioned this pull request Jul 16, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.12.0 https-quantumblockchainai-atlassian-net/ossinsight#764
Open
@voidedstarlight voidedstarlight mentioned this pull request Jul 17, 2024
[Snyk] Upgrade @sentry/browser from 8.11.0 to 8.12.0 climatechangeinformation-org/website#162
Closed
This was referenced Jul 17, 2024
[Snyk] Upgrade @sentry/browser from 8.11.0 to 8.12.0 mong/mongts#2782
Closed
[Snyk] Upgrade @sentry/react from 8.11.0 to 8.12.0 mong/mongts#2783
Closed
@q1blue q1blue mentioned this pull request Jul 18, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.13.0 https-quantumblockchainai-atlassian-net/ossinsight#773
Open
@FengShangWuQi FengShangWuQi mentioned this pull request Jul 21, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.13.0 FengShangWuQi/fengshangwuqi.github.io#1909
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lforst lforst Awaiting requested review from lforst
1 more reviewer
@AbhiPrasad AbhiPrasad AbhiPrasad approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@mydea mydea

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Allow to create spans as children of specific spans

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mydea @AbhiPrasad
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.