@AbhiPrasad

Description

Description

https://.com/getsentry/sentry-javascript/blob/develop/packages/node/src/integrations/tracing/express.ts

Similar to the work we did in #16553 for Koa, we should expose ignoreLayers and ignoreLayersType from the underlying OTEL instrumentation.

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

Exposed options:

OptionsTypeExampleDescription
ignoreLayersIgnoreMatcher[][/^/_internal//]Ignore layers that by match.
ignoreLayersTypeExpressLayerType[]['request_handler']Ignore layers of specified type.

ignoreLayers accepts an array of elements of types:

  • string for full match of the path
  • RegExp for partial match of the path
  • function in the form of (path) => boolean for custom logic

ignoreLayersType accepts an array of following strings:

  • router is the name of express.Router(),
  • middleware
  • request_handler is the name for anything that's not a router or a middleware