Skip to content

ref(node): Stop inferring op for spans - #23195

Merged
mydea merged 1 commit into
developfrom
fn/fully-remove-inferral
Aug 10, 2026
Merged

ref(node): Stop inferring op for spans#23195
mydea merged 1 commit into
developfrom
fn/fully-remove-inferral

Conversation

@mydea

@mydea mydea commented Aug 10, 2026

Copy link
Copy Markdown
Member

Stop inferring span ops for node spans. Instead, ensure we actually set the op at span creation time already.

This also removes an otel double instrumentation test as we no longer need this.

Comment thread packages/opentelemetry/src/applyOtelSpanData.ts
@mydea
mydea force-pushed the fn/fully-remove-inferral branch from 9691c4f to a595843 Compare August 10, 2026 07:58
Comment thread packages/opentelemetry/src/tracer.ts
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.35 kB - -
@sentry/browser - with treeshaking flags 28.52 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.85 kB - -
@sentry/browser (incl. Tracing) 48.63 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.64 kB - -
@sentry/browser (incl. Tracing, Profiling) 53.48 kB - -
@sentry/browser (incl. Tracing, Replay) 88.06 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.47 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.78 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.47 kB - -
@sentry/browser (incl. Feedback) 47.69 kB - -
@sentry/browser (incl. sendFeedback) 35.18 kB - -
@sentry/browser (incl. FeedbackAsync) 40.33 kB - -
@sentry/browser (incl. Metrics) 31.43 kB - -
@sentry/browser (incl. Logs) 31.66 kB - -
@sentry/browser (incl. Metrics & Logs) 32.34 kB - -
@sentry/react 32.14 kB - -
@sentry/react (incl. Tracing) 50.83 kB - -
@sentry/vue 35.45 kB - -
@sentry/vue (incl. Tracing) 50.6 kB - -
@sentry/svelte 30.38 kB - -
CDN Bundle 32.32 kB - -
CDN Bundle (incl. Tracing) 49.6 kB - -
CDN Bundle (incl. Logs, Metrics) 33.84 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.9 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.38 kB - -
CDN Bundle (incl. Tracing, Replay) 87.13 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.41 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.94 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.19 kB - -
CDN Bundle - uncompressed 95.83 kB - -
CDN Bundle (incl. Tracing) - uncompressed 148.84 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.42 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.82 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.34 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 268.09 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 272.06 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.79 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.74 kB - -
@sentry/nextjs (client) 53.41 kB - -
@sentry/sveltekit (client) 49.04 kB - -
@sentry/core/server 65.7 kB - -
@sentry/core/browser 52.02 kB - -
@sentry/node 118.85 kB -0.32% -379 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 82.87 kB -0.44% -364 B 🔽
@sentry/aws-serverless 92.17 kB -0.38% -347 B 🔽
@sentry/cloudflare (withSentry) - minified 214.91 kB - -
@sentry/cloudflare (withSentry) 530.62 kB - -

View base workflow run

@mydea
mydea force-pushed the fn/fully-remove-inferral branch from a595843 to 935dec1 Compare August 10, 2026 08:29

@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 1 potential issue.

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 935dec1. Configure here.

* On the OTel SDK provider this happens in the `SentrySpanProcessor`/`SentrySpanExporter` while
* converting `ReadableSpan`s to Sentry payloads (via `parseSpanDescription` + `mapStatus`).
* `SentryTracerProvider` creates native Sentry spans directly and never goes through that pipeline,
* so the same inference has to run here instead — once at span start, and again at span end

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Public op-inference API removed

Medium Severity

This violates the Breaking Changes review rule: applyOtelSpanData is a public @sentry/opentelemetry export that previously inferred sentry.op, and calls without finalizeStatus are now a no-op. backfillStreamedSpanDataFromOtel was also removed from the public export surface with no deprecation notice, which can break custom OTel setups that relied on that inference.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 935dec1. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

all good

Base automatically changed from fn/span-attribute-inferral to develop August 10, 2026 08:34
@mydea
mydea force-pushed the fn/fully-remove-inferral branch from 935dec1 to f43eab0 Compare August 10, 2026 08:34
@mydea
mydea marked this pull request as ready for review August 10, 2026 08:58
@mydea
mydea requested review from a team as code owners August 10, 2026 08:58
@mydea
mydea requested review from JPeer264, andreiborza, chargome and s1gr1d and removed request for a team August 10, 2026 08:58

@andreiborza andreiborza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So much cleaner

@mydea
mydea merged commit 52b0dfd into develop Aug 10, 2026
229 checks passed
@mydea
mydea deleted the fn/fully-remove-inferral branch August 10, 2026 09:29
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.

2 participants