@sentry/react-router 10.62.0 → 10.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"lowQualityTransactionsFilterIntegration.js","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport type { NodeOptions } from '@sentry/node';\n\nconst LOW_QUALITY_TRANSACTIONS_FILTERS = [\n /GET \\/node_modules\\//,\n /GET \\/favicon\\.ico/,\n /GET \\/@id\\//,\n // The span description for the `__manifest` endpoint is `GET *` (`http.route` resolves to `*`).\n // Filter by `http.target` instead, which carries the raw request path.\n { attributes: { 'http.target': /\\/__manifest/ } },\n];\n\n// TODO(v11): Remove the `_options` parameter (unused and only kept for back-compat with the previous signature)\nconst _lowQualityTransactionsFilterIntegration = ((_options?: NodeOptions) => ({\n name: 'LowQualityTransactionsFilter',\n beforeSetup(client) {\n const opts = client.getOptions();\n opts.ignoreSpans = [...(opts.ignoreSpans || []), ...LOW_QUALITY_TRANSACTIONS_FILTERS];\n },\n})) satisfies IntegrationFn;\n\n/**\n * Integration that filters out noisy http transactions such as requests to node_modules, favicon.ico, @id/, __manifest.\n * Adds entries to `ignoreSpans` so the filter applies in both static and streaming trace lifecycles.\n */\nexport const lowQualityTransactionsFilterIntegration = defineIntegration(_lowQualityTransactionsFilterIntegration);\n"],"names":["defineIntegration"],"mappings":";;;;AAIA,MAAM,gCAAA,GAAmC;AAAA,EACvC,sBAAA;AAAA,EACA,oBAAA;AAAA,EACA,aAAA;AAAA;AAAA;AAAA,EAGA,EAAE,UAAA,EAAY,EAAE,aAAA,EAAe,gBAAe;AAChD,CAAA;AAGA,MAAM,wCAAA,IAA4C,CAAC,QAAA,MAA4B;AAAA,EAC7E,IAAA,EAAM,8BAAA;AAAA,EACN,YAAY,MAAA,EAAQ;AAClB,IAAA,MAAM,IAAA,GAAO,OAAO,UAAA,EAAW;AAC/B,IAAA,IAAA,CAAK,WAAA,GAAc,CAAC,GAAI,IAAA,CAAK,eAAe,EAAC,EAAI,GAAG,gCAAgC,CAAA;AAAA,EACtF;AACF,CAAA,CAAA,CAAA;AAMO,MAAM,uCAAA,GAA0CA,uBAAkB,wCAAwC;;;;"}
1
+ {"version":3,"file":"lowQualityTransactionsFilterIntegration.js","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport type { NodeOptions } from '@sentry/node';\n\nconst LOW_QUALITY_TRANSACTIONS_FILTERS = [\n /GET \\/node_modules\\//,\n /GET \\/favicon\\.ico/,\n /GET \\/@id\\//,\n // The span description for the `__manifest` endpoint is `GET *` (`http.route` resolves to `*`).\n // Filter by `http.target` instead, which carries the raw request path.\n { attributes: { 'http.target': /\\/__manifest/ } },\n];\n\n// TODO(v11): Remove the `_options` parameter (unused and only kept for back-compat with the previous signature)\nconst _lowQualityTransactionsFilterIntegration = ((_options?: NodeOptions) => ({\n name: 'LowQualityTransactionsFilter' as const,\n beforeSetup(client) {\n const opts = client.getOptions();\n opts.ignoreSpans = [...(opts.ignoreSpans || []), ...LOW_QUALITY_TRANSACTIONS_FILTERS];\n },\n})) satisfies IntegrationFn;\n\n/**\n * Integration that filters out noisy http transactions such as requests to node_modules, favicon.ico, @id/, __manifest.\n * Adds entries to `ignoreSpans` so the filter applies in both static and streaming trace lifecycles.\n */\nexport const lowQualityTransactionsFilterIntegration = defineIntegration(_lowQualityTransactionsFilterIntegration);\n"],"names":["defineIntegration"],"mappings":";;;;AAIA,MAAM,gCAAA,GAAmC;AAAA,EACvC,sBAAA;AAAA,EACA,oBAAA;AAAA,EACA,aAAA;AAAA;AAAA;AAAA,EAGA,EAAE,UAAA,EAAY,EAAE,aAAA,EAAe,gBAAe;AAChD,CAAA;AAGA,MAAM,wCAAA,IAA4C,CAAC,QAAA,MAA4B;AAAA,EAC7E,IAAA,EAAM,8BAAA;AAAA,EACN,YAAY,MAAA,EAAQ;AAClB,IAAA,MAAM,IAAA,GAAO,OAAO,UAAA,EAAW;AAC/B,IAAA,IAAA,CAAK,WAAA,GAAc,CAAC,GAAI,IAAA,CAAK,eAAe,EAAC,EAAI,GAAG,gCAAgC,CAAA;AAAA,EACtF;AACF,CAAA,CAAA,CAAA;AAMO,MAAM,uCAAA,GAA0CA,uBAAkB,wCAAwC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"reactRouterServer.js","sources":["../../../../src/server/integration/reactRouterServer.ts"],"sourcesContent":["import { HTTP_ROUTE } from '@sentry/conventions/attributes';\nimport { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';\nimport { generateInstrumentOnce, NODE_VERSION } from '@sentry/node';\nimport { ReactRouterInstrumentation } from '../instrumentation/reactRouter';\nimport { registerServerBuildGlobal } from '../serverBuild';\nimport { enableOtelDataLoaderSpanCreation } from '../serverGlobals';\n\nconst INTEGRATION_NAME = 'ReactRouterServer';\n\nconst instrumentReactRouter = generateInstrumentOnce(INTEGRATION_NAME, () => {\n return new ReactRouterInstrumentation();\n});\n\nexport const instrumentReactRouterServer = Object.assign(\n (): void => {\n instrumentReactRouter();\n // Register global for Vite plugin ServerBuild capture\n registerServerBuildGlobal();\n },\n { id: INTEGRATION_NAME },\n);\n\n/**\n * Integration capturing tracing data for React Router server functions.\n */\nexport const reactRouterServerIntegration = defineIntegration(() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // Enable OTEL data-loader spans only on Node versions without the diagnostics_channel-based instrumentation API.\n if (\n (NODE_VERSION.major === 20 && NODE_VERSION.minor < 19) ||\n (NODE_VERSION.major === 22 && NODE_VERSION.minor < 12)\n ) {\n enableOtelDataLoaderSpanCreation();\n }\n\n // Always install to capture ServerBuild for middleware names.\n // Skips per-request wrapping when instrumentation API is active or OTEL span creation is disabled.\n instrumentReactRouterServer();\n },\n processEvent(event) {\n // Express generates bogus `*` routes for data loaders, which we want to remove here\n // we cannot do this earlier because some OTEL instrumentation adds this at some unexpected point\n if (\n event.type === 'transaction' &&\n event.contexts?.trace?.data &&\n event.contexts.trace.data[HTTP_ROUTE] === '*'\n ) {\n const origin = event.contexts.trace.origin;\n const isInstrumentationApiOrigin = origin?.includes('instrumentation_api');\n\n // For instrumentation_api, always clean up bogus `*` route since we set better names\n // For legacy, only clean up if the name has been adjusted (not METHOD *)\n if (isInstrumentationApiOrigin || !event.transaction?.endsWith(' *')) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete event.contexts.trace.data[HTTP_ROUTE];\n }\n }\n\n return event;\n },\n processSegmentSpan(span) {\n // Express generates bogus `*` routes for data loaders, which we want to remove here\n // we cannot do this earlier because some OTEL instrumentation adds this at some unexpected point\n const attributes = span.attributes;\n if (attributes?.[HTTP_ROUTE] !== '*') {\n return;\n }\n\n const origin = attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN];\n const isInstrumentationApiOrigin = typeof origin === 'string' && origin.includes('instrumentation_api');\n\n // For instrumentation_api, always clean up bogus `*` route since we set better names\n // For legacy, only clean up if the name has been adjusted (not METHOD *)\n if (isInstrumentationApiOrigin || !span.name?.endsWith(' *')) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete attributes[HTTP_ROUTE];\n }\n },\n };\n});\n"],"names":["generateInstrumentOnce","ReactRouterInstrumentation","registerServerBuildGlobal","defineIntegration","NODE_VERSION","enableOtelDataLoaderSpanCreation","HTTP_ROUTE","attributes","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN"],"mappings":";;;;;;;;;AAOA,MAAM,gBAAA,GAAmB,mBAAA;AAEzB,MAAM,qBAAA,GAAwBA,2BAAA,CAAuB,gBAAA,EAAkB,MAAM;AAC3E,EAAA,OAAO,IAAIC,sCAAA,EAA2B;AACxC,CAAC,CAAA;AAEM,MAAM,8BAA8B,MAAA,CAAO,MAAA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;AAAA,MACF;AAEA,MAAA,MAAM,MAAA,GAASC,aAAWC,qCAAgC,CAAA;AAC1D,MAAA,MAAM,6BAA6B,OAAO,MAAA,KAAW,QAAA,IAAY,MAAA,CAAO,SAAS,qBAAqB,CAAA;AAItG,MAAA,IAAI,8BAA8B,CAAC,IAAA,CAAK,IAAA,EAAM,QAAA,CAAS,IAAI,CAAA,EAAG;AAE5D,QAAA,OAAOD,aAAWD,qBAAU,CAAA;AAAA,MAC9B;AAAA,IACF;AAAA,GACF;AACF,CAAC;;;;;"}
1
+ {"version":3,"file":"reactRouterServer.js","sources":["../../../../src/server/integration/reactRouterServer.ts"],"sourcesContent":["import { HTTP_ROUTE } from '@sentry/conventions/attributes';\nimport { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';\nimport { generateInstrumentOnce, NODE_VERSION } from '@sentry/node';\nimport { ReactRouterInstrumentation } from '../instrumentation/reactRouter';\nimport { registerServerBuildGlobal } from '../serverBuild';\nimport { enableOtelDataLoaderSpanCreation } from '../serverGlobals';\n\nconst INTEGRATION_NAME = 'ReactRouterServer' as const;\n\nconst instrumentReactRouter = generateInstrumentOnce(INTEGRATION_NAME, () => {\n return new ReactRouterInstrumentation();\n});\n\nexport const instrumentReactRouterServer = Object.assign(\n (): void => {\n instrumentReactRouter();\n // Register global for Vite plugin ServerBuild capture\n registerServerBuildGlobal();\n },\n { id: INTEGRATION_NAME },\n);\n\n/**\n * Integration capturing tracing data for React Router server functions.\n */\nexport const reactRouterServerIntegration = defineIntegration(() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // Enable OTEL data-loader spans only on Node versions without the diagnostics_channel-based instrumentation API.\n if (\n (NODE_VERSION.major === 20 && NODE_VERSION.minor < 19) ||\n (NODE_VERSION.major === 22 && NODE_VERSION.minor < 12)\n ) {\n enableOtelDataLoaderSpanCreation();\n }\n\n // Always install to capture ServerBuild for middleware names.\n // Skips per-request wrapping when instrumentation API is active or OTEL span creation is disabled.\n instrumentReactRouterServer();\n },\n processEvent(event) {\n // Express generates bogus `*` routes for data loaders, which we want to remove here\n // we cannot do this earlier because some OTEL instrumentation adds this at some unexpected point\n if (\n event.type === 'transaction' &&\n event.contexts?.trace?.data &&\n event.contexts.trace.data[HTTP_ROUTE] === '*'\n ) {\n const origin = event.contexts.trace.origin;\n const isInstrumentationApiOrigin = origin?.includes('instrumentation_api');\n\n // For instrumentation_api, always clean up bogus `*` route since we set better names\n // For legacy, only clean up if the name has been adjusted (not METHOD *)\n if (isInstrumentationApiOrigin || !event.transaction?.endsWith(' *')) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete event.contexts.trace.data[HTTP_ROUTE];\n }\n }\n\n return event;\n },\n processSegmentSpan(span) {\n // Express generates bogus `*` routes for data loaders, which we want to remove here\n // we cannot do this earlier because some OTEL instrumentation adds this at some unexpected point\n const attributes = span.attributes;\n if (attributes?.[HTTP_ROUTE] !== '*') {\n return;\n }\n\n const origin = attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN];\n const isInstrumentationApiOrigin = typeof origin === 'string' && origin.includes('instrumentation_api');\n\n // For instrumentation_api, always clean up bogus `*` route since we set better names\n // For legacy, only clean up if the name has been adjusted (not METHOD *)\n if (isInstrumentationApiOrigin || !span.name?.endsWith(' *')) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete attributes[HTTP_ROUTE];\n }\n },\n };\n});\n"],"names":["generateInstrumentOnce","ReactRouterInstrumentation","registerServerBuildGlobal","defineIntegration","NODE_VERSION","enableOtelDataLoaderSpanCreation","HTTP_ROUTE","attributes","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN"],"mappings":";;;;;;;;;AAOA,MAAM,gBAAA,GAAmB,mBAAA;AAEzB,MAAM,qBAAA,GAAwBA,2BAAA,CAAuB,gBAAA,EAAkB,MAAM;AAC3E,EAAA,OAAO,IAAIC,sCAAA,EAA2B;AACxC,CAAC,CAAA;AAEM,MAAM,8BAA8B,M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AAK;AACpC,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,MAAA,GAASC,aAAWC,qCAAgC,CAAA;AAC1D,MAAA,MAAM,6BAA6B,OAAO,MAAA,KAAW,QAAA,IAAY,MAAA,CAAO,SAAS,qBAAqB,CAAA;AAItG,MAAA,IAAI,8BAA8B,CAAC,IAAA,CAAK,IAAA,EAAM,QAAA,CAAS,IAAI,CAAA,EAAG;AAE5D,QAAA,OAAOD,aAAWD,qBAAU,CAAA;AAAA,MAC9B;AAAA,IACF;AAAA,GACF;AACF,CAAC;;;;;"}
@@ -1 +1 @@
1
- {"type":"module","version":"10.62.0"}
1
+ {"type":"module","version":"10.63.0"}
@@ -1 +1 @@
1
- {"version":3,"file":"lowQualityTransactionsFilterIntegration.js","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport type { NodeOptions } from '@sentry/node';\n\nconst LOW_QUALITY_TRANSACTIONS_FILTERS = [\n /GET \\/node_modules\\//,\n /GET \\/favicon\\.ico/,\n /GET \\/@id\\//,\n // The span description for the `__manifest` endpoint is `GET *` (`http.route` resolves to `*`).\n // Filter by `http.target` instead, which carries the raw request path.\n { attributes: { 'http.target': /\\/__manifest/ } },\n];\n\n// TODO(v11): Remove the `_options` parameter (unused and only kept for back-compat with the previous signature)\nconst _lowQualityTransactionsFilterIntegration = ((_options?: NodeOptions) => ({\n name: 'LowQualityTransactionsFilter',\n beforeSetup(client) {\n const opts = client.getOptions();\n opts.ignoreSpans = [...(opts.ignoreSpans || []), ...LOW_QUALITY_TRANSACTIONS_FILTERS];\n },\n})) satisfies IntegrationFn;\n\n/**\n * Integration that filters out noisy http transactions such as requests to node_modules, favicon.ico, @id/, __manifest.\n * Adds entries to `ignoreSpans` so the filter applies in both static and streaming trace lifecycles.\n */\nexport const lowQualityTransactionsFilterIntegration = defineIntegration(_lowQualityTransactionsFilterIntegration);\n"],"names":[],"mappings":";;AAIA,MAAM,gCAAA,GAAmC;AAAA,EACvC,sBAAA;AAAA,EACA,oBAAA;AAAA,EACA,aAAA;AAAA;AAAA;AAAA,EAGA,EAAE,UAAA,EAAY,EAAE,aAAA,EAAe,gBAAe;AAChD,CAAA;AAGA,MAAM,wCAAA,IAA4C,CAAC,QAAA,MAA4B;AAAA,EAC7E,IAAA,EAAM,8BAAA;AAAA,EACN,YAAY,MAAA,EAAQ;AAClB,IAAA,MAAM,IAAA,GAAO,OAAO,UAAA,EAAW;AAC/B,IAAA,IAAA,CAAK,WAAA,GAAc,CAAC,GAAI,IAAA,CAAK,eAAe,EAAC,EAAI,GAAG,gCAAgC,CAAA;AAAA,EACtF;AACF,CAAA,CAAA,CAAA;AAMO,MAAM,uCAAA,GAA0C,kBAAkB,wCAAwC;;;;"}
1
+ {"version":3,"file":"lowQualityTransactionsFilterIntegration.js","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport type { NodeOptions } from '@sentry/node';\n\nconst LOW_QUALITY_TRANSACTIONS_FILTERS = [\n /GET \\/node_modules\\//,\n /GET \\/favicon\\.ico/,\n /GET \\/@id\\//,\n // The span description for the `__manifest` endpoint is `GET *` (`http.route` resolves to `*`).\n // Filter by `http.target` instead, which carries the raw request path.\n { attributes: { 'http.target': /\\/__manifest/ } },\n];\n\n// TODO(v11): Remove the `_options` parameter (unused and only kept for back-compat with the previous signature)\nconst _lowQualityTransactionsFilterIntegration = ((_options?: NodeOptions) => ({\n name: 'LowQualityTransactionsFilter' as const,\n beforeSetup(client) {\n const opts = client.getOptions();\n opts.ignoreSpans = [...(opts.ignoreSpans || []), ...LOW_QUALITY_TRANSACTIONS_FILTERS];\n },\n})) satisfies IntegrationFn;\n\n/**\n * Integration that filters out noisy http transactions such as requests to node_modules, favicon.ico, @id/, __manifest.\n * Adds entries to `ignoreSpans` so the filter applies in both static and streaming trace lifecycles.\n */\nexport const lowQualityTransactionsFilterIntegration = defineIntegration(_lowQualityTransactionsFilterIntegration);\n"],"names":[],"mappings":";;AAIA,MAAM,gCAAA,GAAmC;AAAA,EACvC,sBAAA;AAAA,EACA,oBAAA;AAAA,EACA,aAAA;AAAA;AAAA;AAAA,EAGA,EAAE,UAAA,EAAY,EAAE,aAAA,EAAe,gBAAe;AAChD,CAAA;AAGA,MAAM,wCAAA,IAA4C,CAAC,QAAA,MAA4B;AAAA,EAC7E,IAAA,EAAM,8BAAA;AAAA,EACN,YAAY,MAAA,EAAQ;AAClB,IAAA,MAAM,IAAA,GAAO,OAAO,UAAA,EAAW;AAC/B,IAAA,IAAA,CAAK,WAAA,GAAc,CAAC,GAAI,IAAA,CAAK,eAAe,EAAC,EAAI,GAAG,gCAAgC,CAAA;AAAA,EACtF;AACF,CAAA,CAAA,CAAA;AAMO,MAAM,uCAAA,GAA0C,kBAAkB,wCAAwC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"reactRouterServer.js","sources":["../../../../src/server/integration/reactRouterServer.ts"],"sourcesContent":["import { HTTP_ROUTE } from '@sentry/conventions/attributes';\nimport { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';\nimport { generateInstrumentOnce, NODE_VERSION } from '@sentry/node';\nimport { ReactRouterInstrumentation } from '../instrumentation/reactRouter';\nimport { registerServerBuildGlobal } from '../serverBuild';\nimport { enableOtelDataLoaderSpanCreation } from '../serverGlobals';\n\nconst INTEGRATION_NAME = 'ReactRouterServer';\n\nconst instrumentReactRouter = generateInstrumentOnce(INTEGRATION_NAME, () => {\n return new ReactRouterInstrumentation();\n});\n\nexport const instrumentReactRouterServer = Object.assign(\n (): void => {\n instrumentReactRouter();\n // Register global for Vite plugin ServerBuild capture\n registerServerBuildGlobal();\n },\n { id: INTEGRATION_NAME },\n);\n\n/**\n * Integration capturing tracing data for React Router server functions.\n */\nexport const reactRouterServerIntegration = defineIntegration(() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // Enable OTEL data-loader spans only on Node versions without the diagnostics_channel-based instrumentation API.\n if (\n (NODE_VERSION.major === 20 && NODE_VERSION.minor < 19) ||\n (NODE_VERSION.major === 22 && NODE_VERSION.minor < 12)\n ) {\n enableOtelDataLoaderSpanCreation();\n }\n\n // Always install to capture ServerBuild for middleware names.\n // Skips per-request wrapping when instrumentation API is active or OTEL span creation is disabled.\n instrumentReactRouterServer();\n },\n processEvent(event) {\n // Express generates bogus `*` routes for data loaders, which we want to remove here\n // we cannot do this earlier because some OTEL instrumentation adds this at some unexpected point\n if (\n event.type === 'transaction' &&\n event.contexts?.trace?.data &&\n event.contexts.trace.data[HTTP_ROUTE] === '*'\n ) {\n const origin = event.contexts.trace.origin;\n const isInstrumentationApiOrigin = origin?.includes('instrumentation_api');\n\n // For instrumentation_api, always clean up bogus `*` route since we set better names\n // For legacy, only clean up if the name has been adjusted (not METHOD *)\n if (isInstrumentationApiOrigin || !event.transaction?.endsWith(' *')) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete event.contexts.trace.data[HTTP_ROUTE];\n }\n }\n\n return event;\n },\n processSegmentSpan(span) {\n // Express generates bogus `*` routes for data loaders, which we want to remove here\n // we cannot do this earlier because some OTEL instrumentation adds this at some unexpected point\n const attributes = span.attributes;\n if (attributes?.[HTTP_ROUTE] !== '*') {\n return;\n }\n\n const origin = attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN];\n const isInstrumentationApiOrigin = typeof origin === 'string' && origin.includes('instrumentation_api');\n\n // For instrumentation_api, always clean up bogus `*` route since we set better names\n // For legacy, only clean up if the name has been adjusted (not METHOD *)\n if (isInstrumentationApiOrigin || !span.name?.endsWith(' *')) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete attributes[HTTP_ROUTE];\n }\n },\n };\n});\n"],"names":[],"mappings":";;;;;;;AAOA,MAAM,gBAAA,GAAmB,mBAAA;AAEzB,MAAM,qBAAA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;AAGvB,MAAA,MAAM,aAAa,IAAA,CAAK,UAAA;AACxB,MAAA,IAAI,UAAA,GAAa,UAAU,CAAA,KAAM,GAAA,EAAK;AACpC,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,MAAA,GAAS,WAAW,gCAAgC,CAAA;AAC1D,MAAA,MAAM,6BAA6B,OAAO,MAAA,KAAW,QAAA,IAAY,MAAA,CAAO,SAAS,qBAAqB,CAAA;AAItG,MAAA,IAAI,8BAA8B,CAAC,IAAA,CAAK,IAAA,EAAM,QAAA,CAAS,IAAI,CAAA,EAAG;AAE5D,QAAA,OAAO,WAAW,UAAU,CAAA;AAAA,MAC9B;AAAA,IACF;AAAA,GACF;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"reactRouterServer.js","sources":["../../../../src/server/integration/reactRouterServer.ts"],"sourcesContent":["import { HTTP_ROUTE } from '@sentry/conventions/attributes';\nimport { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';\nimport { generateInstrumentOnce, NODE_VERSION } from '@sentry/node';\nimport { ReactRouterInstrumentation } from '../instrumentation/reactRouter';\nimport { registerServerBuildGlobal } from '../serverBuild';\nimport { enableOtelDataLoaderSpanCreation } from '../serverGlobals';\n\nconst INTEGRATION_NAME = 'ReactRouterServer' as const;\n\nconst instrumentReactRouter = generateInstrumentOnce(INTEGRATION_NAME, () => {\n return new ReactRouterInstrumentation();\n});\n\nexport const instrumentReactRouterServer = Object.assign(\n (): void => {\n instrumentReactRouter();\n // Register global for Vite plugin ServerBuild capture\n registerServerBuildGlobal();\n },\n { id: INTEGRATION_NAME },\n);\n\n/**\n * Integration capturing tracing data for React Router server functions.\n */\nexport const reactRouterServerIntegration = defineIntegration(() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // Enable OTEL data-loader spans only on Node versions without the diagnostics_channel-based instrumentation API.\n if (\n (NODE_VERSION.major === 20 && NODE_VERSION.minor < 19) ||\n (NODE_VERSION.major === 22 && NODE_VERSION.minor < 12)\n ) {\n enableOtelDataLoaderSpanCreation();\n }\n\n // Always install to capture ServerBuild for middleware names.\n // Skips per-request wrapping when instrumentation API is active or OTEL span creation is disabled.\n instrumentReactRouterServer();\n },\n processEvent(event) {\n // Express generates bogus `*` routes for data loaders, which we want to remove here\n // we cannot do this earlier because some OTEL instrumentation adds this at some unexpected point\n if (\n event.type === 'transaction' &&\n event.contexts?.trace?.data &&\n event.contexts.trace.data[HTTP_ROUTE] === '*'\n ) {\n const origin = event.contexts.trace.origin;\n const isInstrumentationApiOrigin = origin?.includes('instrumentation_api');\n\n // For instrumentation_api, always clean up bogus `*` route since we set better names\n // For legacy, only clean up if the name has been adjusted (not METHOD *)\n if (isInstrumentationApiOrigin || !event.transaction?.endsWith(' *')) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete event.contexts.trace.data[HTTP_ROUTE];\n }\n }\n\n return event;\n },\n processSegmentSpan(span) {\n // Express generates bogus `*` routes for data loaders, which we want to remove here\n // we cannot do this earlier because some OTEL instrumentation adds this at some unexpected point\n const attributes = span.attributes;\n if (attributes?.[HTTP_ROUTE] !== '*') {\n return;\n }\n\n const origin = attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN];\n const isInstrumentationApiOrigin = typeof origin === 'string' && origin.includes('instrumentation_api');\n\n // For instrumentation_api, always clean up bogus `*` route since we set better names\n // For legacy, only clean up if the name has been adjusted (not METHOD *)\n if (isInstrumentationApiOrigin || !span.name?.endsWith(' *')) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete attributes[HTTP_ROUTE];\n }\n },\n };\n});\n"],"names":[],"mappings":";;;;;;;AAOA,MAAM,gBAAA,GAAmB,mBAAA;AAEzB,MAAM,qBAAA,GAAwB,sBAAA,CAAuB,gBAAA,EAAkB,MAAM;AAC3E,EAAA,OAAO,IAAI,0BAAA,EAA2B;AACxC,CAAC,CAAA;AAEM,MAAM,8BAA8B,MAAA,CAAO,MAAA;AAAA,EAChD,MAAY;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WAAW,gCAAgC,CAAA;AAC1D,MAAA,MAAM,6BAA6B,OAAO,MAAA,KAAW,QAAA,IAAY,MAAA,CAAO,SAAS,qBAAqB,CAAA;AAItG,MAAA,IAAI,8BAA8B,CAAC,IAAA,CAAK,IAAA,EAAM,QAAA,CAAS,IAAI,CAAA,EAAG;AAE5D,QAAA,OAAO,WAAW,UAAU,CAAA;AAAA,MAC9B;AAAA,IACF;AAAA,GACF;AACF,CAAC;;;;"}
@@ -3,5 +3,7 @@ import type { NodeOptions } from '@sentry/node';
3
3
  * Integration that filters out noisy http transactions such as requests to node_modules, favicon.ico, @id/, __manifest.
4
4
  * Adds entries to `ignoreSpans` so the filter applies in both static and streaming trace lifecycles.
5
5
  */
6
- export declare const lowQualityTransactionsFilterIntegration: (_options?: NodeOptions | undefined) => import("@sentry/core").Integration;
6
+ export declare const lowQualityTransactionsFilterIntegration: (_options?: NodeOptions | undefined) => import("@sentry/core").Integration & {
7
+ name: "LowQualityTransactionsFilter";
8
+ };
7
9
  //# sourceMappingURL=lowQualityTransactionsFilterIntegration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lowQualityTransactionsFilterIntegration.d.ts","sourceRoot":"","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAoBhD;;;GAGG;AACH,eAAO,MAAM,uCAAuC,4EAA8D,CAAC"}
1
+ {"version":3,"file":"lowQualityTransactionsFilterIntegration.d.ts","sourceRoot":"","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAoBhD;;;GAGG;AACH,eAAO,MAAM,uCAAuC;;CAA8D,CAAC"}
@@ -1,8 +1,10 @@
1
1
  export declare const instrumentReactRouterServer: (() => void) & {
2
- id: string;
2
+ id: "ReactRouterServer";
3
3
  };
4
4
  /**
5
5
  * Integration capturing tracing data for React Router server functions.
6
6
  */
7
- export declare const reactRouterServerIntegration: () => import("@sentry/core").Integration;
7
+ export declare const reactRouterServerIntegration: () => import("@sentry/core").Integration & {
8
+ name: "ReactRouterServer";
9
+ };
8
10
  //# sourceMappingURL=reactRouterServer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reactRouterServer.d.ts","sourceRoot":"","sources":["../../../../src/server/integration/reactRouterServer.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,2BAA2B,SAClC,IAAI;;CAMT,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,0CAwDvC,CAAC"}
1
+ {"version":3,"file":"reactRouterServer.d.ts","sourceRoot":"","sources":["../../../../src/server/integration/reactRouterServer.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,2BAA2B,SAClC,IAAI;;CAMT,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B;;CAwDvC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/react-router",
3
- "version": "10.62.0",
3
+ "version": "10.63.0",
4
4
  "description": "Official Sentry SDK for React Router (Framework)",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/react-router",
@@ -47,12 +47,12 @@
47
47
  "dependencies": {
48
48
  "@opentelemetry/api": "^1.9.1",
49
49
  "@opentelemetry/instrumentation": "^0.214.0",
50
- "@sentry/browser": "10.62.0",
50
+ "@sentry/browser": "10.63.0",
51
51
  "@sentry/cli": "^2.58.6",
52
52
  "@sentry/conventions": "^0.12.0",
53
- "@sentry/core": "10.62.0",
54
- "@sentry/node": "10.62.0",
55
- "@sentry/react": "10.62.0",
53
+ "@sentry/core": "10.63.0",
54
+ "@sentry/node": "10.63.0",
55
+ "@sentry/react": "10.63.0",
56
56
  "@sentry/vite-plugin": "^5.3.0",
57
57
  "glob": "^13.0.6"
58
58
  },