@sentry/react-router 10.31.0 → 10.32.0-alpha.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.
@@ -15,6 +15,7 @@ function _lowQualityTransactionsFilterIntegration(options)
15
15
  return {
16
16
  name: 'LowQualityTransactionsFilter',
17
17
 
18
+ // TODO (span-streaming): port this logic to spans via a hook or ignoreSpans default;
18
19
  processEvent(event, _hint, _client) {
19
20
  if (event.type !== 'transaction' || !event.transaction) {
20
21
  return event;
@@ -1 +1 @@
1
- {"version":3,"file":"lowQualityTransactionsFilterIntegration.js","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"sourcesContent":["import { type Client, debug, defineIntegration, type Event, type EventHint } from '@sentry/core';\nimport type { NodeOptions } from '@sentry/node';\n\n/**\n * Integration that filters out noisy http transactions such as requests to node_modules, favicon.ico, @id/\n *\n */\n\nfunction _lowQualityTransactionsFilterIntegration(options: NodeOptions): {\n name: string;\n processEvent: (event: Event, hint: EventHint, client: Client) => Event | null;\n} {\n const matchedRegexes = [/GET \\/node_modules\\//, /GET \\/favicon\\.ico/, /GET \\/@id\\//, /GET \\/__manifest\\?/];\n\n return {\n name: 'LowQualityTransactionsFilter',\n\n processEvent(event: Event, _hint: EventHint, _client: Client): Event | null {\n if (event.type !== 'transaction' || !event.transaction) {\n return event;\n }\n\n const transaction = event.transaction;\n\n if (matchedRegexes.some(regex => transaction.match(regex))) {\n options.debug && debug.log('[ReactRouter] Filtered node_modules transaction:', event.transaction);\n return null;\n }\n\n return event;\n },\n };\n}\n\nexport const lowQualityTransactionsFilterIntegration = defineIntegration((options: NodeOptions) =>\n _lowQualityTransactionsFilterIntegration(options),\n);\n"],"names":["debug","defineIntegration"],"mappings":";;;;AAGA;AACA;AACA;AACA;;AAEA,SAAS,wCAAwC,CAAC,OAAO;;AAGzD,CAAE;AACF,EAAE,MAAM,cAAA,GAAiB,CAAC,sBAAsB,EAAE,oBAAoB,EAAE,aAAa,EAAE,oBAAoB,CAAC;;AAE5G,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,8BAA8B;;AAExC,IAAI,YAAY,CAAC,KAAK,EAAS,KAAK,EAAa,OAAO,EAAwB;AAChF,MAAM,IAAI,KAAK,CAAC,IAAA,KAAS,aAAA,IAAiB,CAAC,KAAK,CAAC,WAAW,EAAE;AAC9D,QAAQ,OAAO,KAAK;AACpB,MAAM;;AAEN,MAAM,MAAM,WAAA,GAAc,KAAK,CAAC,WAAW;;AAE3C,MAAM,IAAI,cAAc,CAAC,IAAI,CAAC,KAAA,IAAS,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;AAClE,QAAQ,OAAO,CAAC,KAAA,IAASA,UAAK,CAAC,GAAG,CAAC,kDAAkD,EAAE,KAAK,CAAC,WAAW,CAAC;AACzG,QAAQ,OAAO,IAAI;AACnB,MAAM;;AAEN,MAAM,OAAO,KAAK;AAClB,IAAI,CAAC;AACL,GAAG;AACH;;MAEa,uCAAA,GAA0CC,sBAAiB,CAAC,CAAC,OAAO;AACjF,EAAE,wCAAwC,CAAC,OAAO,CAAC;AACnD;;;;"}
1
+ {"version":3,"file":"lowQualityTransactionsFilterIntegration.js","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"sourcesContent":["import { type Client, debug, defineIntegration, type Event, type EventHint } from '@sentry/core';\nimport type { NodeOptions } from '@sentry/node';\n\n/**\n * Integration that filters out noisy http transactions such as requests to node_modules, favicon.ico, @id/\n *\n */\n\nfunction _lowQualityTransactionsFilterIntegration(options: NodeOptions): {\n name: string;\n processEvent: (event: Event, hint: EventHint, client: Client) => Event | null;\n} {\n const matchedRegexes = [/GET \\/node_modules\\//, /GET \\/favicon\\.ico/, /GET \\/@id\\//, /GET \\/__manifest\\?/];\n\n return {\n name: 'LowQualityTransactionsFilter',\n\n // TODO (span-streaming): port this logic to spans via a hook or ignoreSpans default;\n processEvent(event: Event, _hint: EventHint, _client: Client): Event | null {\n if (event.type !== 'transaction' || !event.transaction) {\n return event;\n }\n\n const transaction = event.transaction;\n\n if (matchedRegexes.some(regex => transaction.match(regex))) {\n options.debug && debug.log('[ReactRouter] Filtered node_modules transaction:', event.transaction);\n return null;\n }\n\n return event;\n },\n };\n}\n\nexport const lowQualityTransactionsFilterIntegration = defineIntegration((options: NodeOptions) =>\n _lowQualityTransactionsFilterIntegration(options),\n);\n"],"names":["debug","defineIntegration"],"mappings":";;;;AAGA;AACA;AACA;AACA;;AAEA,SAAS,wCAAwC,CAAC,OAAO;;AAGzD,CAAE;AACF,EAAE,MAAM,cAAA,GAAiB,CAAC,sBAAsB,EAAE,oBAAoB,EAAE,aAAa,EAAE,oBAAoB,CAAC;;AAE5G,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,8BAA8B;;AAExC;AACA,IAAI,YAAY,CAAC,KAAK,EAAS,KAAK,EAAa,OAAO,EAAwB;AAChF,MAAM,IAAI,KAAK,CAAC,IAAA,KAAS,aAAA,IAAiB,CAAC,KAAK,CAAC,WAAW,EAAE;AAC9D,QAAQ,OAAO,KAAK;AACpB,MAAM;;AAEN,MAAM,MAAM,WAAA,GAAc,KAAK,CAAC,WAAW;;AAE3C,MAAM,IAAI,cAAc,CAAC,IAAI,CAAC,KAAA,IAAS,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;AAClE,QAAQ,OAAO,CAAC,KAAA,IAASA,UAAK,CAAC,GAAG,CAAC,kDAAkD,EAAE,KAAK,CAAC,WAAW,CAAC;AACzG,QAAQ,OAAO,IAAI;AACnB,MAAM;;AAEN,MAAM,OAAO,KAAK;AAClB,IAAI,CAAC;AACL,GAAG;AACH;;MAEa,uCAAA,GAA0CC,sBAAiB,CAAC,CAAC,OAAO;AACjF,EAAE,wCAAwC,CAAC,OAAO,CAAC;AACnD;;;;"}
@@ -32,6 +32,7 @@ const reactRouterServerIntegration = core.defineIntegration(() => {
32
32
  instrumentReactRouterServer();
33
33
  }
34
34
  },
35
+ // TODO (span-streaming): port this logic to spans via a hook or ignoreSpans default;
35
36
  processEvent(event) {
36
37
  // Express generates bogus `*` routes for data loaders, which we want to remove here
37
38
  // we cannot do this earlier because some OTEL instrumentation adds this at some unexpected point
@@ -1 +1 @@
1
- {"version":3,"file":"reactRouterServer.js","sources":["../../../../src/server/integration/reactRouterServer.ts"],"sourcesContent":["import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce, NODE_VERSION } from '@sentry/node';\nimport { ReactRouterInstrumentation } from '../instrumentation/reactRouter';\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 },\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 if (\n (NODE_VERSION.major === 20 && NODE_VERSION.minor < 19) || // https://nodejs.org/en/blog/release/v20.19.0\n (NODE_VERSION.major === 22 && NODE_VERSION.minor < 12) // https://nodejs.org/en/blog/release/v22.12.0\n ) {\n instrumentReactRouterServer();\n }\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[ATTR_HTTP_ROUTE] === '*' &&\n // This means the name has been adjusted before, but the http.route remains, so we need to remove it\n event.transaction !== 'GET *' &&\n event.transaction !== 'POST *'\n ) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete event.contexts.trace.data[ATTR_HTTP_ROUTE];\n }\n\n return event;\n },\n };\n});\n"],"names":["generateInstrumentOnce","ReactRouterInstrumentation","defineIntegration","NODE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AI,CAAC;AACL,GAAG;AACH,CAAC;;;;;"}
1
+ {"version":3,"file":"reactRouterServer.js","sources":["../../../../src/server/integration/reactRouterServer.ts"],"sourcesContent":["import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce, NODE_VERSION } from '@sentry/node';\nimport { ReactRouterInstrumentation } from '../instrumentation/reactRouter';\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 },\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 if (\n (NODE_VERSION.major === 20 && NODE_VERSION.minor < 19) || // https://nodejs.org/en/blog/release/v20.19.0\n (NODE_VERSION.major === 22 && NODE_VERSION.minor < 12) // https://nodejs.org/en/blog/release/v22.12.0\n ) {\n instrumentReactRouterServer();\n }\n },\n // TODO (span-streaming): port this logic to spans via a hook or ignoreSpans default;\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[ATTR_HTTP_ROUTE] === '*' &&\n // This means the name has been adjusted before, but the http.route remains, so we need to remove it\n event.transaction !== 'GET *' &&\n event.transaction !== 'POST *'\n ) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete event.contexts.trace.data[ATTR_HTTP_ROUTE];\n }\n\n return event;\n },\n };\n});\n"],"names":["generateInstrumentOnce","ReactRouterInstrumentation","defineIntegration","NODE_VERSION","ATTR_HTTP_ROUTE"],"mappings":";;;;;;;AAKA,MAAM,gBAAA,GAAmB,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module","version":"10.31.0"}
1
+ {"type":"module","version":"10.32.0-alpha.0"}
@@ -13,6 +13,7 @@ function _lowQualityTransactionsFilterIntegration(options)
13
13
  return {
14
14
  name: 'LowQualityTransactionsFilter',
15
15
 
16
+ // TODO (span-streaming): port this logic to spans via a hook or ignoreSpans default;
16
17
  processEvent(event, _hint, _client) {
17
18
  if (event.type !== 'transaction' || !event.transaction) {
18
19
  return event;
@@ -1 +1 @@
1
- {"version":3,"file":"lowQualityTransactionsFilterIntegration.js","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"sourcesContent":["import { type Client, debug, defineIntegration, type Event, type EventHint } from '@sentry/core';\nimport type { NodeOptions } from '@sentry/node';\n\n/**\n * Integration that filters out noisy http transactions such as requests to node_modules, favicon.ico, @id/\n *\n */\n\nfunction _lowQualityTransactionsFilterIntegration(options: NodeOptions): {\n name: string;\n processEvent: (event: Event, hint: EventHint, client: Client) => Event | null;\n} {\n const matchedRegexes = [/GET \\/node_modules\\//, /GET \\/favicon\\.ico/, /GET \\/@id\\//, /GET \\/__manifest\\?/];\n\n return {\n name: 'LowQualityTransactionsFilter',\n\n processEvent(event: Event, _hint: EventHint, _client: Client): Event | null {\n if (event.type !== 'transaction' || !event.transaction) {\n return event;\n }\n\n const transaction = event.transaction;\n\n if (matchedRegexes.some(regex => transaction.match(regex))) {\n options.debug && debug.log('[ReactRouter] Filtered node_modules transaction:', event.transaction);\n return null;\n }\n\n return event;\n },\n };\n}\n\nexport const lowQualityTransactionsFilterIntegration = defineIntegration((options: NodeOptions) =>\n _lowQualityTransactionsFilterIntegration(options),\n);\n"],"names":[],"mappings":";;AAGA;AACA;AACA;AACA;;AAEA,SAAS,wCAAwC,CAAC,OAAO;;AAGzD,CAAE;AACF,EAAE,MAAM,cAAA,GAAiB,CAAC,sBAAsB,EAAE,oBAAoB,EAAE,aAAa,EAAE,oBAAoB,CAAC;;AAE5G,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,8BAA8B;;AAExC,IAAI,YAAY,CAAC,KAAK,EAAS,KAAK,EAAa,OAAO,EAAwB;AAChF,MAAM,IAAI,KAAK,CAAC,IAAA,KAAS,aAAA,IAAiB,CAAC,KAAK,CAAC,WAAW,EAAE;AAC9D,QAAQ,OAAO,KAAK;AACpB,MAAM;;AAEN,MAAM,MAAM,WAAA,GAAc,KAAK,CAAC,WAAW;;AAE3C,MAAM,IAAI,cAAc,CAAC,IAAI,CAAC,KAAA,IAAS,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;AAClE,QAAQ,OAAO,CAAC,KAAA,IAAS,KAAK,CAAC,GAAG,CAAC,kDAAkD,EAAE,KAAK,CAAC,WAAW,CAAC;AACzG,QAAQ,OAAO,IAAI;AACnB,MAAM;;AAEN,MAAM,OAAO,KAAK;AAClB,IAAI,CAAC;AACL,GAAG;AACH;;MAEa,uCAAA,GAA0C,iBAAiB,CAAC,CAAC,OAAO;AACjF,EAAE,wCAAwC,CAAC,OAAO,CAAC;AACnD;;;;"}
1
+ {"version":3,"file":"lowQualityTransactionsFilterIntegration.js","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"sourcesContent":["import { type Client, debug, defineIntegration, type Event, type EventHint } from '@sentry/core';\nimport type { NodeOptions } from '@sentry/node';\n\n/**\n * Integration that filters out noisy http transactions such as requests to node_modules, favicon.ico, @id/\n *\n */\n\nfunction _lowQualityTransactionsFilterIntegration(options: NodeOptions): {\n name: string;\n processEvent: (event: Event, hint: EventHint, client: Client) => Event | null;\n} {\n const matchedRegexes = [/GET \\/node_modules\\//, /GET \\/favicon\\.ico/, /GET \\/@id\\//, /GET \\/__manifest\\?/];\n\n return {\n name: 'LowQualityTransactionsFilter',\n\n // TODO (span-streaming): port this logic to spans via a hook or ignoreSpans default;\n processEvent(event: Event, _hint: EventHint, _client: Client): Event | null {\n if (event.type !== 'transaction' || !event.transaction) {\n return event;\n }\n\n const transaction = event.transaction;\n\n if (matchedRegexes.some(regex => transaction.match(regex))) {\n options.debug && debug.log('[ReactRouter] Filtered node_modules transaction:', event.transaction);\n return null;\n }\n\n return event;\n },\n };\n}\n\nexport const lowQualityTransactionsFilterIntegration = defineIntegration((options: NodeOptions) =>\n _lowQualityTransactionsFilterIntegration(options),\n);\n"],"names":[],"mappings":";;AAGA;AACA;AACA;AACA;;AAEA,SAAS,wCAAwC,CAAC,OAAO;;AAGzD,CAAE;AACF,EAAE,MAAM,cAAA,GAAiB,CAAC,sBAAsB,EAAE,oBAAoB,EAAE,aAAa,EAAE,oBAAoB,CAAC;;AAE5G,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,8BAA8B;;AAExC;AACA,IAAI,YAAY,CAAC,KAAK,EAAS,KAAK,EAAa,OAAO,EAAwB;AAChF,MAAM,IAAI,KAAK,CAAC,IAAA,KAAS,aAAA,IAAiB,CAAC,KAAK,CAAC,WAAW,EAAE;AAC9D,QAAQ,OAAO,KAAK;AACpB,MAAM;;AAEN,MAAM,MAAM,WAAA,GAAc,KAAK,CAAC,WAAW;;AAE3C,MAAM,IAAI,cAAc,CAAC,IAAI,CAAC,KAAA,IAAS,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;AAClE,QAAQ,OAAO,CAAC,KAAA,IAAS,KAAK,CAAC,GAAG,CAAC,kDAAkD,EAAE,KAAK,CAAC,WAAW,CAAC;AACzG,QAAQ,OAAO,IAAI;AACnB,MAAM;;AAEN,MAAM,OAAO,KAAK;AAClB,IAAI,CAAC;AACL,GAAG;AACH;;MAEa,uCAAA,GAA0C,iBAAiB,CAAC,CAAC,OAAO;AACjF,EAAE,wCAAwC,CAAC,OAAO,CAAC;AACnD;;;;"}
@@ -30,6 +30,7 @@ const reactRouterServerIntegration = defineIntegration(() => {
30
30
  instrumentReactRouterServer();
31
31
  }
32
32
  },
33
+ // TODO (span-streaming): port this logic to spans via a hook or ignoreSpans default;
33
34
  processEvent(event) {
34
35
  // Express generates bogus `*` routes for data loaders, which we want to remove here
35
36
  // we cannot do this earlier because some OTEL instrumentation adds this at some unexpected point
@@ -1 +1 @@
1
- {"version":3,"file":"reactRouterServer.js","sources":["../../../../src/server/integration/reactRouterServer.ts"],"sourcesContent":["import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce, NODE_VERSION } from '@sentry/node';\nimport { ReactRouterInstrumentation } from '../instrumentation/reactRouter';\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 },\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 if (\n (NODE_VERSION.major === 20 && NODE_VERSION.minor < 19) || // https://nodejs.org/en/blog/release/v20.19.0\n (NODE_VERSION.major === 22 && NODE_VERSION.minor < 12) // https://nodejs.org/en/blog/release/v22.12.0\n ) {\n instrumentReactRouterServer();\n }\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[ATTR_HTTP_ROUTE] === '*' &&\n // This means the name has been adjusted before, but the http.route remains, so we need to remove it\n event.transaction !== 'GET *' &&\n event.transaction !== 'POST *'\n ) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete event.contexts.trace.data[ATTR_HTTP_ROUTE];\n }\n\n return event;\n },\n };\n});\n"],"names":[],"mappings":";;;;;AAKA,MAAM,gBAAA,GAAmB,mBAAmB;;AAE5C,MAAM,qBAAA,GAAwB,sBAAsB,CAAC,gBAAgB,EAAE,MAAM;AAC7E,EAAE,OAAO,IAAI,0BAA0B,EAAE;AACzC,CAAC,CAAC;;AAEK,MAAM,2BAAA,GAA8B,MAAM,CAAC,MAAM;AACxD,EAAE,MAAY;AACd,IAAI,qBAAqB,EAAE;AAC3B,EAAE,CAAC;AACH,EAAE,EAAE,EAAE,EAAE,gBAAA,EAAkB;AAC1B;;AAEA;AACA;AACA;MACa,4BAAA,GAA+B,iBAAiB,CAAC,MAAM;AACpE,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM;AACN,QAAQ,CAAC,YAAY,CAAC,KAAA,KAAU,EAAA,IAAM,YAAY,CAAC,KAAA,GAAQ,EAAE;AAC7D,SAAS,YAAY,CAAC,KAAA,KAAU,EAAA,IAAM,YAAY,CAAC,KAAA,GAAQ,EAAE,CAAA;AAC7D,QAAQ;AACR,QAAQ,2BAA2B,EAAE;AACrC,MAAM;AACN,IAAI,CAAC;AACL,IAAI,YAAY,CAAC,KAAK,EAAE;AACxB;AACA;AACA,MAAM;AACN,QAAQ,KAAK,CAAC,IAAA,KAAS,aAAA;AACvB,QAAQ,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAA;AAC/B,QAAQ,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAA,KAAM,GAAA;AACvD;AACA,QAAQ,KAAK,CAAC,WAAA,KAAgB,OAAA;AAC9B,QAAQ,KAAK,CAAC,WAAA,KAAgB;AAC9B,QAAQ;AACR;AACA,QAAQ,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;AACzD,MAAM;;AAEN,MAAM,OAAO,KAAK;AAClB,IAAI,CAAC;AACL,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"reactRouterServer.js","sources":["../../../../src/server/integration/reactRouterServer.ts"],"sourcesContent":["import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce, NODE_VERSION } from '@sentry/node';\nimport { ReactRouterInstrumentation } from '../instrumentation/reactRouter';\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 },\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 if (\n (NODE_VERSION.major === 20 && NODE_VERSION.minor < 19) || // https://nodejs.org/en/blog/release/v20.19.0\n (NODE_VERSION.major === 22 && NODE_VERSION.minor < 12) // https://nodejs.org/en/blog/release/v22.12.0\n ) {\n instrumentReactRouterServer();\n }\n },\n // TODO (span-streaming): port this logic to spans via a hook or ignoreSpans default;\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[ATTR_HTTP_ROUTE] === '*' &&\n // This means the name has been adjusted before, but the http.route remains, so we need to remove it\n event.transaction !== 'GET *' &&\n event.transaction !== 'POST *'\n ) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete event.contexts.trace.data[ATTR_HTTP_ROUTE];\n }\n\n return event;\n },\n };\n});\n"],"names":[],"mappings":";;;;;AAKA,MAAM,gBAAA,GAAmB,mBAAmB;;AAE5C,MAAM,qBAAA,GAAwB,sBAAsB,CAAC,gBAAgB,EAAE,MAAM;AAC7E,EAAE,OAAO,IAAI,0BAA0B,EAAE;AACzC,CAAC,CAAC;;AAEK,MAAM,2BAAA,GAA8B,MAAM,CAAC,MAAM;AACxD,EAAE,MAAY;AACd,IAAI,qBAAqB,EAAE;AAC3B,EAAE,CAAC;AACH,EAAE,EAAE,EAAE,EAAE,gBAAA,EAAkB;AAC1B;;AAEA;AACA;AACA;MACa,4BAAA,GAA+B,iBAAiB,CAAC,MAAM;AACpE,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM;AACN,QAAQ,CAAC,YAAY,CAAC,KAAA,KAAU,EAAA,IAAM,YAAY,CAAC,KAAA,GAAQ,EAAE;AAC7D,SAAS,YAAY,CAAC,KAAA,KAAU,EAAA,IAAM,YAAY,CAAC,KAAA,GAAQ,EAAE,CAAA;AAC7D,QAAQ;AACR,QAAQ,2BAA2B,EAAE;AACrC,MAAM;AACN,IAAI,CAAC;AACL;AACA,IAAI,YAAY,CAAC,KAAK,EAAE;AACxB;AACA;AACA,MAAM;AACN,QAAQ,KAAK,CAAC,IAAA,KAAS,aAAA;AACvB,QAAQ,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAA;AAC/B,QAAQ,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAA,KAAM,GAAA;AACvD;AACA,QAAQ,KAAK,CAAC,WAAA,KAAgB,OAAA;AAC9B,QAAQ,KAAK,CAAC,WAAA,KAAgB;AAC9B,QAAQ;AACR;AACA,QAAQ,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;AACzD,MAAM;;AAEN,MAAM,OAAO,KAAK;AAClB,IAAI,CAAC;AACL,GAAG;AACH,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"lowQualityTransactionsFilterIntegration.d.ts","sourceRoot":"","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAiChD,eAAO,MAAM,uCAAuC,8DAEnD,CAAC"}
1
+ {"version":3,"file":"lowQualityTransactionsFilterIntegration.d.ts","sourceRoot":"","sources":["../../../../src/server/integration/lowQualityTransactionsFilterIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAkChD,eAAO,MAAM,uCAAuC,8DAEnD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"reactRouterServer.d.ts","sourceRoot":"","sources":["../../../../src/server/integration/reactRouterServer.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,2BAA2B,SAClC,IAAI;;CAIT,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,0CA6BvC,CAAC"}
1
+ {"version":3,"file":"reactRouterServer.d.ts","sourceRoot":"","sources":["../../../../src/server/integration/reactRouterServer.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,2BAA2B,SAClC,IAAI;;CAIT,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,0CA8BvC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/react-router",
3
- "version": "10.31.0",
3
+ "version": "10.32.0-alpha.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",
@@ -49,11 +49,11 @@
49
49
  "@opentelemetry/core": "^2.2.0",
50
50
  "@opentelemetry/instrumentation": "^0.208.0",
51
51
  "@opentelemetry/semantic-conventions": "^1.37.0",
52
- "@sentry/browser": "10.31.0",
52
+ "@sentry/browser": "10.32.0-alpha.0",
53
53
  "@sentry/cli": "^2.58.4",
54
- "@sentry/core": "10.31.0",
55
- "@sentry/node": "10.31.0",
56
- "@sentry/react": "10.31.0",
54
+ "@sentry/core": "10.32.0-alpha.0",
55
+ "@sentry/node": "10.32.0-alpha.0",
56
+ "@sentry/react": "10.32.0-alpha.0",
57
57
  "@sentry/vite-plugin": "^4.6.1",
58
58
  "glob": "11.1.0"
59
59
  },