Skip to content

feat(nestjs): Use more specific span origins for NestJS guards, pipes, interceptors, and exception filters#19751

Merged
nicohrubec merged 1 commit intodevelopfrom
nh/nestjs-specific-middleware-origins
Mar 11, 2026
Merged

feat(nestjs): Use more specific span origins for NestJS guards, pipes, interceptors, and exception filters#19751
nicohrubec merged 1 commit intodevelopfrom
nh/nestjs-specific-middleware-origins

Conversation

@nicohrubec
Copy link
Member

This should allow for more specific querying for users and also potentially interesting data to look at for us in the future. Spans emitted from actual middlewares keep the same origin as before, for the rest I added the integration-part so we know where the span is coming from.

Closes #19750

@github-actions
Copy link
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 25.64 kB +0.05% +12 B 🔺
@sentry/browser - with treeshaking flags 24.14 kB +0.03% +7 B 🔺
@sentry/browser (incl. Tracing) 42.62 kB +0.44% +184 B 🔺
@sentry/browser (incl. Tracing, Profiling) 47.28 kB +0.4% +187 B 🔺
@sentry/browser (incl. Tracing, Replay) 81.42 kB +0.22% +171 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 71 kB +0.18% +125 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 86.12 kB +0.21% +178 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 98.37 kB +0.18% +167 B 🔺
@sentry/browser (incl. Feedback) 42.45 kB +0.03% +9 B 🔺
@sentry/browser (incl. sendFeedback) 30.31 kB +0.05% +14 B 🔺
@sentry/browser (incl. FeedbackAsync) 35.36 kB +0.04% +12 B 🔺
@sentry/browser (incl. Metrics) 26.92 kB +0.48% +126 B 🔺
@sentry/browser (incl. Logs) 27.07 kB +0.48% +128 B 🔺
@sentry/browser (incl. Metrics & Logs) 27.74 kB +0.46% +127 B 🔺
@sentry/react 27.39 kB +0.04% +9 B 🔺
@sentry/react (incl. Tracing) 44.95 kB +0.41% +180 B 🔺
@sentry/vue 30.08 kB +0.03% +7 B 🔺
@sentry/vue (incl. Tracing) 44.48 kB +0.42% +183 B 🔺
@sentry/svelte 25.66 kB +0.04% +9 B 🔺
CDN Bundle 28.27 kB +0.35% +97 B 🔺
CDN Bundle (incl. Tracing) 43.5 kB +0.55% +237 B 🔺
CDN Bundle (incl. Logs, Metrics) 29.13 kB +0.42% +121 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 44.34 kB +0.56% +243 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 68.2 kB +0.16% +107 B 🔺
CDN Bundle (incl. Tracing, Replay) 80.32 kB +0.23% +183 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81.22 kB +0.27% +218 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 85.86 kB +0.24% +205 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.76 kB +0.27% +226 B 🔺
CDN Bundle - uncompressed 82.56 kB +0.26% +211 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 128.5 kB +0.34% +433 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.43 kB +0.29% +244 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 131.37 kB +0.36% +466 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 209.06 kB +0.11% +212 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 245.35 kB +0.17% +401 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 248.21 kB +0.18% +434 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 258.26 kB +0.16% +401 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 261.11 kB +0.17% +434 B 🔺
@sentry/nextjs (client) 47.37 kB +0.39% +184 B 🔺
@sentry/sveltekit (client) 43.07 kB +0.42% +178 B 🔺
@sentry/node-core 52.27 kB +0.06% +31 B 🔺
@sentry/node 174.76 kB +0.04% +53 B 🔺
@sentry/node - without tracing 97.43 kB +0.06% +50 B 🔺
@sentry/aws-serverless 113.23 kB +0.04% +45 B 🔺

View base workflow run

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

lgtm

@nicohrubec nicohrubec merged commit 1c249d9 into develop Mar 11, 2026
49 checks passed
@nicohrubec nicohrubec deleted the nh/nestjs-specific-middleware-origins branch March 11, 2026 08:59
andreiborza pushed a commit that referenced this pull request Mar 11, 2026
…, interceptors, and exception filters (#19751)

This should allow for more specific querying for users and also
potentially interesting data to look at for us in the future. Spans
emitted from actual middlewares keep the same origin as before, for the
rest I added the integration-part so we know where the span is coming
from.

Closes #19750
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.

Add integration part to middleware span origins

3 participants