Skip to content

feat(node): Introduce ignoreLayersType option to koa integration #16553

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

Merged

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Jun 11, 2025

ref https://linear.app/getsentry/issue/FE-503/investigate-nested-middleware-spans-in-webfx-koa-application

The Koa integration in @sentry/node was updated to expose the ignoreLayersType option from @opentelemetry/instrumentation-koa, aligning its configuration with the GraphQL integration.

https://www.npmjs.com/package/@opentelemetry/instrumentation-koa

Koa Instrumentation Options

Options Type Example Description
ignoreLayersType KoaLayerType[] ['middleware'] Ignore layers of specified type.
requestHook KoaRequestCustomAttributeFunction (span, info) => {} Function for adding custom attributes to Koa middleware layers. Receives params: Span, KoaRequestInfo.

ignoreLayersType accepts an array of KoaLayerType which can take the following string values:

  • router,
  • middleware.

Copy link
Contributor

github-actions bot commented Jun 11, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.99 kB - -
@sentry/browser - with treeshaking flags 23.76 kB - -
@sentry/browser (incl. Tracing) 38.36 kB - -
@sentry/browser (incl. Tracing, Replay) 76.47 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.57 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 81.23 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 93.31 kB - -
@sentry/browser (incl. Feedback) 40.73 kB - -
@sentry/browser (incl. sendFeedback) 28.7 kB - -
@sentry/browser (incl. FeedbackAsync) 33.59 kB - -
@sentry/react 25.76 kB - -
@sentry/react (incl. Tracing) 40.35 kB - -
@sentry/vue 28.36 kB - -
@sentry/vue (incl. Tracing) 40.21 kB - -
@sentry/svelte 24.01 kB - -
CDN Bundle 25.48 kB - -
CDN Bundle (incl. Tracing) 38.55 kB - -
CDN Bundle (incl. Tracing, Replay) 74.42 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 79.87 kB - -
CDN Bundle - uncompressed 74.48 kB - -
CDN Bundle (incl. Tracing) - uncompressed 114.16 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 228.13 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 240.95 kB - -
@sentry/nextjs (client) 42.01 kB - -
@sentry/sveltekit (client) 38.84 kB - -
@sentry/node 150.48 kB +0.02% +27 B 🔺
@sentry/node - without tracing 98.35 kB - -
@sentry/aws-serverless 124.11 kB - -

View base workflow run

@AbhiPrasad AbhiPrasad marked this pull request as ready for review June 11, 2025 14:55
@AbhiPrasad AbhiPrasad requested review from a team, Lms24 and andreiborza and removed request for a team June 11, 2025 14:55
@AbhiPrasad AbhiPrasad self-assigned this Jun 11, 2025
@AbhiPrasad AbhiPrasad merged commit ba3728d into develop Jun 11, 2025
117 checks passed
@AbhiPrasad AbhiPrasad deleted the cursor/update-koa-integration-for-ignorelayerstype-f90d branch June 11, 2025 17:30
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.

3 participants