Skip to content

feat(core): Add sentry.trace_lifecycle: 'static' to transactions and their spans - #25114

Closed
Lms24 wants to merge 3 commits into
developfrom
lms/feat-core-static-trace-lifecycle-attribute
Closed

Lms24 wants to merge 3 commits into
developfrom
lms/feat-core-static-trace-lifecycle-attribute

Conversation

@Lms24

@Lms24 Lms24 commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Streamed spans already carry sentry.trace_lifecycle: 'stream'. This sets the static counterpart on the transaction (its trace context) and on every child span when a root span is converted to a transaction event.

…d their spans

Streamed spans already carry `sentry.trace_lifecycle: 'stream'`. Set the
`static` counterpart on the transaction's trace context and on every child
span when a root span is converted to a transaction event. The attribute is
added to copies of the span data so it doesn't leak onto the live spans.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Lms24 Lms24 self-assigned this Oct 7, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 25f7d12. Configure here.

Comment thread packages/core/test/lib/tracing/sentrySpan.test.ts
Comment thread packages/core/test/lib/tracing/sentrySpan.test.ts Outdated
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.6 kB - -
@sentry/browser - with treeshaking flags 27.75 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.65 kB - -
@sentry/browser (incl. Tracing) 51.54 kB +0.06% +26 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 51.55 kB +0.05% +25 B 🔺
@sentry/browser (incl. Tracing, Profiling) 54.53 kB +0.05% +27 B 🔺
@sentry/browser (incl. Tracing, Replay) 91.25 kB +0.04% +28 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.21 kB +0.04% +27 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 95.96 kB +0.04% +31 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 108.92 kB +0.03% +31 B 🔺
@sentry/browser (incl. Feedback) 47.12 kB - -
@sentry/browser (incl. sendFeedback) 34.65 kB - -
@sentry/browser (incl. FeedbackAsync) 39.76 kB - -
@sentry/browser (incl. Metrics) 30.61 kB - -
@sentry/browser (incl. Logs) 30.89 kB - -
@sentry/browser (incl. Metrics & Logs) 31.55 kB - -
@sentry/react 31.43 kB - -
@sentry/react (incl. Tracing) 53.86 kB +0.06% +27 B 🔺
@sentry/vue 37.58 kB +0.08% +29 B 🔺
@sentry/vue (incl. Tracing) 54.42 kB +0.06% +28 B 🔺
@sentry/svelte 29.63 kB - -
@sentry/remix (Remix 3 client bundle) 56.56 kB +0.04% +22 B 🔺
CDN Bundle 31.33 kB - -
CDN Bundle (incl. Tracing) 52.09 kB +0.06% +27 B 🔺
CDN Bundle (incl. Logs, Metrics) 33.56 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.05 kB +0.05% +26 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 74.38 kB - -
CDN Bundle (incl. Tracing, Replay) 89.76 kB +0.03% +23 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.72 kB +0.03% +23 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 95.92 kB +0.03% +20 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.89 kB +0.03% +21 B 🔺
CDN Bundle - uncompressed 92.46 kB - -
CDN Bundle (incl. Tracing) - uncompressed 154.82 kB +0.04% +52 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.04 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 160.78 kB +0.04% +52 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 228.98 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 274.94 kB +0.02% +52 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 280.88 kB +0.02% +52 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 288.64 kB +0.02% +52 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 294.57 kB +0.02% +52 B 🔺
@sentry/nextjs (client) 56.22 kB +0.05% +27 B 🔺
@sentry/sveltekit (client) 51.93 kB +0.06% +28 B 🔺
@sentry/core/server 40.67 kB +0.06% +22 B 🔺
@sentry/core/browser 13.54 kB +0.16% +21 B 🔺
@sentry/node 145.22 kB +0.03% +30 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.22 kB - -
@sentry/node - without tracing 93.48 kB +0.03% +23 B 🔺
@sentry/node - without channel injection 123.39 kB +0.03% +32 B 🔺
@sentry/aws-serverless 101.72 kB +0.03% +25 B 🔺
@sentry/cloudflare (withSentry) - minified 209.04 kB +0.03% +52 B 🔺
@sentry/cloudflare (withSentry) 517.7 kB +0.02% +81 B 🔺

View base workflow run

Lms24 and others added 2 commits October 7, 2026 10:31
…heir spans

Update exact-match assertions on transaction trace data and child span data
across unit, integration, Playwright and E2E tests, and use the
`SENTRY_TRACE_LIFECYCLE` constant where `@sentry/conventions` is available.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…AGENTS.md

Mirrors the existing BUGBOT.md rule so agents use the conventions constants
instead of string literals for attribute names and span ops, including in tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Lms24

Lms24 commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Honestly not wort to merge this. For a complete picture we already have to check for the absence of this attribute, so adding it now kinda feels like making these queries harder, while also increasing the bundle size. I'm gonna close for now. We can always reopen when we find a use case why we'd need the attribute specifically.

@Lms24 Lms24 closed this Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant