Conversation

AbhiPrasad

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

OptionsTypeExampleDescription
ignoreLayersTypeKoaLayerType[]['middleware']Ignore layers of specified type.
requestHookKoaRequestCustomAttributeFunction(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.

@github-actionsGitHub Actions

size-limit report 📦

PathSize% ChangeChange
@sentry/browser23.99 kB--
@sentry/browser - with treeshaking flags23.76 kB--
@sentry/browser (incl. Tracing)38.36 kB--
@sentry/browser (incl. Tracing, Replay)76.47 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags69.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/react25.76 kB--
@sentry/react (incl. Tracing)40.35 kB--
@sentry/vue28.36 kB--
@sentry/vue (incl. Tracing)40.21 kB--
@sentry/svelte24.01 kB--
CDN Bundle25.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 - uncompressed74.48 kB--
CDN Bundle (incl. Tracing) - uncompressed114.16 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed228.13 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed240.95 kB--
@sentry/nextjs (client)42.01 kB--
@sentry/sveltekit (client)38.84 kB--
@sentry/node150.48 kB+0.02%+27 B 🔺
@sentry/node - without tracing98.35 kB--
@sentry/aws-serverless124.11 kB--

View base workflow run

@AbhiPrasadAbhiPrasad marked this pull request as ready for review June 11, 2025 14:55
@AbhiPrasadAbhiPrasad requested review from a team, Lms24 and andreiborza and removed request for a team June 11, 2025 14:55
@AbhiPrasadAbhiPrasad self-assigned this Jun 11, 2025
@AbhiPrasadAbhiPrasad merged commit ba3728d into develop Jun 11, 2025
117 checks passed
@AbhiPrasadAbhiPrasad deleted the cursor/update-koa-integration-for-ignorelayerstype-f90d branch June 11, 2025 17:30
AbhiPrasad added a commit to getsentry/sentry-docs that referenced this pull request Jun 18, 2025
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.