@sentry/react-router 9.25.1 → 9.27.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.
- package/build/cjs/index.client.js +8 -0
- package/build/cjs/index.client.js.map +1 -1
- package/build/cjs/index.server.js +4 -0
- package/build/cjs/index.server.js.map +1 -1
- package/build/cjs/server/sdk.js +10 -5
- package/build/cjs/server/sdk.js.map +1 -1
- package/build/cjs/server/wrapServerAction.js +59 -0
- package/build/cjs/server/wrapServerAction.js.map +1 -0
- package/build/cjs/server/wrapServerLoader.js +59 -0
- package/build/cjs/server/wrapServerLoader.js.map +1 -0
- package/build/cjs/vite/makeCustomSentryVitePlugins.js +13 -1
- package/build/cjs/vite/makeCustomSentryVitePlugins.js.map +1 -1
- package/build/esm/index.client.js +1 -0
- package/build/esm/index.client.js.map +1 -1
- package/build/esm/index.server.js +2 -0
- package/build/esm/index.server.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/sdk.js +11 -6
- package/build/esm/server/sdk.js.map +1 -1
- package/build/esm/server/wrapServerAction.js +57 -0
- package/build/esm/server/wrapServerAction.js.map +1 -0
- package/build/esm/server/wrapServerLoader.js +57 -0
- package/build/esm/server/wrapServerLoader.js.map +1 -0
- package/build/esm/vite/makeCustomSentryVitePlugins.js +13 -1
- package/build/esm/vite/makeCustomSentryVitePlugins.js.map +1 -1
- package/build/types/client/index.d.ts +2 -0
- package/build/types/client/index.d.ts.map +1 -1
- package/build/types/server/index.d.ts +2 -0
- package/build/types/server/index.d.ts.map +1 -1
- package/build/types/server/sdk.d.ts.map +1 -1
- package/build/types/server/wrapServerAction.d.ts +28 -0
- package/build/types/server/wrapServerAction.d.ts.map +1 -0
- package/build/types/server/wrapServerLoader.d.ts +28 -0
- package/build/types/server/wrapServerLoader.d.ts.map +1 -0
- package/build/types/vite/makeCustomSentryVitePlugins.d.ts.map +1 -1
- package/build/types/vite/types.d.ts +17 -0
- package/build/types/vite/types.d.ts.map +1 -1
- package/package.json +8 -7
|
@@ -3,11 +3,19 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3
3
|
const browser = require('@sentry/browser');
|
|
4
4
|
const sdk = require('./client/sdk.js');
|
|
5
5
|
const tracingIntegration = require('./client/tracingIntegration.js');
|
|
6
|
+
const react = require('@sentry/react');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
exports.init = sdk.init;
|
|
10
11
|
exports.reactRouterTracingIntegration = tracingIntegration.reactRouterTracingIntegration;
|
|
12
|
+
exports.ErrorBoundary = react.ErrorBoundary;
|
|
13
|
+
exports.Profiler = react.Profiler;
|
|
14
|
+
exports.captureReactException = react.captureReactException;
|
|
15
|
+
exports.reactErrorHandler = react.reactErrorHandler;
|
|
16
|
+
exports.useProfiler = react.useProfiler;
|
|
17
|
+
exports.withErrorBoundary = react.withErrorBoundary;
|
|
18
|
+
exports.withProfiler = react.withProfiler;
|
|
11
19
|
Object.prototype.hasOwnProperty.call(browser, '__proto__') &&
|
|
12
20
|
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
13
21
|
Object.defineProperty(exports, '__proto__', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,6 +4,8 @@ const node = require('@sentry/node');
|
|
|
4
4
|
const sdk = require('./server/sdk.js');
|
|
5
5
|
const wrapSentryHandleRequest = require('./server/wrapSentryHandleRequest.js');
|
|
6
6
|
const createSentryHandleRequest = require('./server/createSentryHandleRequest.js');
|
|
7
|
+
const wrapServerAction = require('./server/wrapServerAction.js');
|
|
8
|
+
const wrapServerLoader = require('./server/wrapServerLoader.js');
|
|
7
9
|
const plugin = require('./vite/plugin.js');
|
|
8
10
|
const handleOnBuildEnd = require('./vite/buildEnd/handleOnBuildEnd.js');
|
|
9
11
|
const makeConfigInjectorPlugin = require('./vite/makeConfigInjectorPlugin.js');
|
|
@@ -15,6 +17,8 @@ exports.getMetaTagTransformer = wrapSentryHandleRequest.getMetaTagTransformer;
|
|
|
15
17
|
exports.sentryHandleRequest = wrapSentryHandleRequest.sentryHandleRequest;
|
|
16
18
|
exports.wrapSentryHandleRequest = wrapSentryHandleRequest.wrapSentryHandleRequest;
|
|
17
19
|
exports.createSentryHandleRequest = createSentryHandleRequest.createSentryHandleRequest;
|
|
20
|
+
exports.wrapServerAction = wrapServerAction.wrapServerAction;
|
|
21
|
+
exports.wrapServerLoader = wrapServerLoader.wrapServerLoader;
|
|
18
22
|
exports.sentryReactRouter = plugin.sentryReactRouter;
|
|
19
23
|
exports.sentryOnBuildEnd = handleOnBuildEnd.sentryOnBuildEnd;
|
|
20
24
|
exports.makeConfigInjectorPlugin = makeConfigInjectorPlugin.makeConfigInjectorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/cjs/server/sdk.js
CHANGED
|
@@ -13,11 +13,16 @@ const reactRouterServer = require('./integration/reactRouterServer.js');
|
|
|
13
13
|
* @param options The options for the SDK.
|
|
14
14
|
*/
|
|
15
15
|
function getDefaultReactRouterServerIntegrations(options) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const integrations = [...node.getDefaultIntegrations(options), lowQualityTransactionsFilterIntegration.lowQualityTransactionsFilterIntegration(options)];
|
|
17
|
+
|
|
18
|
+
if (
|
|
19
|
+
(node.NODE_VERSION.major === 20 && node.NODE_VERSION.minor < 19) || // https://nodejs.org/en/blog/release/v20.19.0
|
|
20
|
+
(node.NODE_VERSION.major === 22 && node.NODE_VERSION.minor < 12) // https://nodejs.org/en/blog/release/v22.12.0
|
|
21
|
+
) {
|
|
22
|
+
integrations.push(reactRouterServer.reactRouterServerIntegration());
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return integrations;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport type { EventProcessor, Integration } from '@sentry/core';\nimport { applySdkMetadata, getGlobalScope, logger, setTag } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { getDefaultIntegrations as getNodeDefaultIntegrations, init as initNodeSdk } from '@sentry/node';\nimport { DEBUG_BUILD } from '../common/debug-build';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util';\nimport { lowQualityTransactionsFilterIntegration } from './integration/lowQualityTransactionsFilterIntegration';\nimport { reactRouterServerIntegration } from './integration/reactRouterServer';\n\n/**\n * Returns the default integrations for the React Router SDK.\n * @param options The options for the SDK.\n */\nexport function getDefaultReactRouterServerIntegrations(options: NodeOptions): Integration[] {\n
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport type { EventProcessor, Integration } from '@sentry/core';\nimport { applySdkMetadata, getGlobalScope, logger, setTag } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { getDefaultIntegrations as getNodeDefaultIntegrations, init as initNodeSdk, NODE_VERSION } from '@sentry/node';\nimport { DEBUG_BUILD } from '../common/debug-build';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util';\nimport { lowQualityTransactionsFilterIntegration } from './integration/lowQualityTransactionsFilterIntegration';\nimport { reactRouterServerIntegration } from './integration/reactRouterServer';\n\n/**\n * Returns the default integrations for the React Router SDK.\n * @param options The options for the SDK.\n */\nexport function getDefaultReactRouterServerIntegrations(options: NodeOptions): Integration[] {\n const integrations = [...getNodeDefaultIntegrations(options), lowQualityTransactionsFilterIntegration(options)];\n\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 integrations.push(reactRouterServerIntegration());\n }\n\n return integrations;\n}\n\n/**\n * Initializes the server side of the React Router SDK\n */\nexport function init(options: NodeOptions): NodeClient | undefined {\n const opts: NodeOptions = {\n ...options,\n defaultIntegrations: getDefaultReactRouterServerIntegrations(options),\n };\n\n DEBUG_BUILD && logger.log('Initializing SDK...');\n\n applySdkMetadata(opts, 'react-router', ['react-router', 'node']);\n\n const client = initNodeSdk(opts);\n\n setTag('runtime', 'node');\n\n // Overwrite the transaction name for instrumented data loaders because the trace data gets overwritten at a later point.\n // We only update the tx in case SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE got set in our instrumentation before.\n getGlobalScope().addEventProcessor(\n Object.assign(\n (event => {\n const overwrite = event.contexts?.trace?.data?.[SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE];\n if (\n event.type === 'transaction' &&\n (event.transaction === 'GET *' || event.transaction === 'POST *') &&\n event.contexts?.trace?.data?.[ATTR_HTTP_ROUTE] === '*' &&\n overwrite\n ) {\n event.transaction = overwrite;\n event.contexts.trace.data[ATTR_HTTP_ROUTE] = 'url';\n }\n\n // always yeet this attribute into the void, as this should not reach the server\n delete event.contexts?.trace?.data?.[SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE];\n\n return event;\n }) satisfies EventProcessor,\n { id: 'ReactRouterTransactionEnhancer' },\n ),\n );\n\n DEBUG_BUILD && logger.log('SDK successfully initialized');\n\n return client;\n}\n"],"names":["getNodeDefaultIntegrations","lowQualityTransactionsFilterIntegration","NODE_VERSION","reactRouterServerIntegration","DEBUG_BUILD","logger","applySdkMetadata","initNodeSdk","setTag","getGlobalScope","SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE","ATTR_HTTP_ROUTE"],"mappings":";;;;;;;;;;AAUA;AACA;AACA;AACA;AACO,SAAS,uCAAuC,CAAC,OAAO,EAA8B;AAC7F,EAAE,MAAM,YAAA,GAAe,CAAC,GAAGA,2BAA0B,CAAC,OAAO,CAAC,EAAEC,+EAAuC,CAAC,OAAO,CAAC,CAAC;;AAEjH,EAAE;AACF,IAAI,CAACC,iBAAY,CAAC,KAAA,KAAU,EAAA,IAAMA,iBAAY,CAAC,KAAA,GAAQ,EAAE;AACzD,KAAKA,iBAAY,CAAC,KAAM,KAAI,EAAG,IAAGA,iBAAY,CAAC,KAAM,GAAE,EAAE,CAAA;AACzD,IAAI;AACJ,IAAI,YAAY,CAAC,IAAI,CAACC,8CAA4B,EAAE,CAAC;AACrD;;AAEA,EAAE,OAAO,YAAY;AACrB;;AAEA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAuC;AACnE,EAAE,MAAM,IAAI,GAAgB;AAC5B,IAAI,GAAG,OAAO;AACd,IAAI,mBAAmB,EAAE,uCAAuC,CAAC,OAAO,CAAC;AACzE,GAAG;;AAEH,EAAEC,0BAAeC,WAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC;;AAElD,EAAEC,qBAAgB,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;;AAElE,EAAE,MAAM,MAAO,GAAEC,SAAW,CAAC,IAAI,CAAC;;AAElC,EAAEC,WAAM,CAAC,SAAS,EAAE,MAAM,CAAC;;AAE3B;AACA;AACA,EAAEC,mBAAc,EAAE,CAAC,iBAAiB;AACpC,IAAI,MAAM,CAAC,MAAM;AACjB,OAAO,SAAS;AAChB,QAAQ,MAAM,SAAA,GAAY,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,GAAGC,wCAAmC,CAAC;AAC5F,QAAQ;AACR,UAAU,KAAK,CAAC,IAAK,KAAI,aAAc;AACvC,WAAW,KAAK,CAAC,WAAA,KAAgB,OAAA,IAAW,KAAK,CAAC,WAAA,KAAgB,QAAQ,CAAE;AAC5E,UAAU,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,GAAGC,mCAAe,CAAE,KAAI,GAAI;AACjE,UAAU;AACV,UAAU;AACV,UAAU,KAAK,CAAC,WAAY,GAAE,SAAS;AACvC,UAAU,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAACA,mCAAe,CAAE,GAAE,KAAK;AAC5D;;AAEA;AACA,QAAQ,OAAO,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,GAAGD,wCAAmC,CAAC;;AAEjF,QAAQ,OAAO,KAAK;AACpB,OAAO;AACP,MAAM,EAAE,EAAE,EAAE,gCAAA,EAAkC;AAC9C,KAAK;AACL,GAAG;;AAEH,EAAEN,0BAAeC,WAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC;;AAE3D,EAAE,OAAO,MAAM;AACf;;;;;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const core = require('@sentry/core');
|
|
4
|
+
const util = require('./instrumentation/util.js');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Wraps a React Router server action function with Sentry performance monitoring.
|
|
8
|
+
* @param options - Optional span configuration options including name, operation, description and attributes
|
|
9
|
+
* @param actionFn - The server action function to wrap
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* // Wrap an action function with custom span options
|
|
14
|
+
* export const action = wrapServerAction(
|
|
15
|
+
* {
|
|
16
|
+
* name: 'Submit Form Data',
|
|
17
|
+
* description: 'Processes form submission data',
|
|
18
|
+
* },
|
|
19
|
+
* async ({ request }) => {
|
|
20
|
+
* // ... your action logic
|
|
21
|
+
* }
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
function wrapServerAction(options = {}, actionFn) {
|
|
26
|
+
return async function (args) {
|
|
27
|
+
const name = options.name || 'Executing Server Action';
|
|
28
|
+
const active = core.getActiveSpan();
|
|
29
|
+
if (active) {
|
|
30
|
+
const root = core.getRootSpan(active);
|
|
31
|
+
// coming from auto.http.otel.http
|
|
32
|
+
if (core.spanToJSON(root).description === 'POST') {
|
|
33
|
+
const url = core.parseStringToURLObject(args.request.url);
|
|
34
|
+
if (url?.pathname) {
|
|
35
|
+
root.setAttributes({
|
|
36
|
+
[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
|
|
37
|
+
[util.SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE]: `${args.request.method} ${url.pathname}`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return core.startSpan(
|
|
44
|
+
{
|
|
45
|
+
name,
|
|
46
|
+
...options,
|
|
47
|
+
attributes: {
|
|
48
|
+
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react-router',
|
|
49
|
+
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.action',
|
|
50
|
+
...options.attributes,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
() => actionFn(args),
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
exports.wrapServerAction = wrapServerAction;
|
|
59
|
+
//# sourceMappingURL=wrapServerAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapServerAction.js","sources":["../../../src/server/wrapServerAction.ts"],"sourcesContent":["import type { SpanAttributes } from '@sentry/core';\nimport {\n getActiveSpan,\n getRootSpan,\n parseStringToURLObject,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n spanToJSON,\n startSpan,\n} from '@sentry/core';\nimport type { ActionFunctionArgs } from 'react-router';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util';\n\ntype SpanOptions = {\n name?: string;\n attributes?: SpanAttributes;\n};\n\n/**\n * Wraps a React Router server action function with Sentry performance monitoring.\n * @param options - Optional span configuration options including name, operation, description and attributes\n * @param actionFn - The server action function to wrap\n *\n * @example\n * ```ts\n * // Wrap an action function with custom span options\n * export const action = wrapServerAction(\n * {\n * name: 'Submit Form Data',\n * description: 'Processes form submission data',\n * },\n * async ({ request }) => {\n * // ... your action logic\n * }\n * );\n * ```\n */\nexport function wrapServerAction<T>(options: SpanOptions = {}, actionFn: (args: ActionFunctionArgs) => Promise<T>) {\n return async function (args: ActionFunctionArgs) {\n const name = options.name || 'Executing Server Action';\n const active = getActiveSpan();\n if (active) {\n const root = getRootSpan(active);\n // coming from auto.http.otel.http\n if (spanToJSON(root).description === 'POST') {\n const url = parseStringToURLObject(args.request.url);\n if (url?.pathname) {\n root.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE]: `${args.request.method} ${url.pathname}`,\n });\n }\n }\n }\n\n return startSpan(\n {\n name,\n ...options,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react-router',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.action',\n ...options.attributes,\n },\n },\n () => actionFn(args),\n );\n };\n}\n"],"names":["getActiveSpan","getRootSpan","spanToJSON","parseStringToURLObject","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE","startSpan","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_SENTRY_OP"],"mappings":";;;;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAI,OAAO,GAAgB,EAAE,EAAE,QAAQ,EAA4C;AACnH,EAAE,OAAO,gBAAgB,IAAI,EAAsB;AACnD,IAAI,MAAM,IAAK,GAAE,OAAO,CAAC,IAAA,IAAQ,yBAAyB;AAC1D,IAAI,MAAM,MAAA,GAASA,kBAAa,EAAE;AAClC,IAAI,IAAI,MAAM,EAAE;AAChB,MAAM,MAAM,IAAK,GAAEC,gBAAW,CAAC,MAAM,CAAC;AACtC;AACA,MAAM,IAAIC,eAAU,CAAC,IAAI,CAAC,CAAC,WAAA,KAAgB,MAAM,EAAE;AACnD,QAAQ,MAAM,GAAI,GAAEC,2BAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;AAC5D,QAAQ,IAAI,GAAG,EAAE,QAAQ,EAAE;AAC3B,UAAU,IAAI,CAAC,aAAa,CAAC;AAC7B,YAAY,CAACC,qCAAgC,GAAG,KAAK;AACrD,YAAY,CAACC,wCAAmC,GAAG,CAAC,EAAA,IAAA,CAAA,OAAA,CAAA,MAAA,CAAA,CAAA,EAAA,GAAA,CAAA,QAAA,CAAA,CAAA;AACA,WAAA,CAAA;AACA;AACA;AACA;;AAEA,IAAA,OAAAC,cAAA;AACA,MAAA;AACA,QAAA,IAAA;AACA,QAAA,GAAA,OAAA;AACA,QAAA,UAAA,EAAA;AACA,UAAA,CAAAC,qCAAA,GAAA,wBAAA;AACA,UAAA,CAAAC,iCAAA,GAAA,8BAAA;AACA,UAAA,GAAA,OAAA,CAAA,UAAA;AACA,SAAA;AACA,OAAA;AACA,MAAA,MAAA,QAAA,CAAA,IAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA;;;;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const core = require('@sentry/core');
|
|
4
|
+
const util = require('./instrumentation/util.js');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Wraps a React Router server loader function with Sentry performance monitoring.
|
|
8
|
+
* @param options - Optional span configuration options including name, operation, description and attributes
|
|
9
|
+
* @param loaderFn - The server loader function to wrap
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* // Wrap a loader function with custom span options
|
|
14
|
+
* export const loader = wrapServerLoader(
|
|
15
|
+
* {
|
|
16
|
+
* name: 'Load Some Data',
|
|
17
|
+
* description: 'Loads some data from the db',
|
|
18
|
+
* },
|
|
19
|
+
* async ({ params }) => {
|
|
20
|
+
* // ... your loader logic
|
|
21
|
+
* }
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
function wrapServerLoader(options = {}, loaderFn) {
|
|
26
|
+
return async function (args) {
|
|
27
|
+
const name = options.name || 'Executing Server Loader';
|
|
28
|
+
const active = core.getActiveSpan();
|
|
29
|
+
if (active) {
|
|
30
|
+
const root = core.getRootSpan(active);
|
|
31
|
+
// coming from auto.http.otel.http
|
|
32
|
+
if (core.spanToJSON(root).description === 'GET') {
|
|
33
|
+
const url = core.parseStringToURLObject(args.request.url);
|
|
34
|
+
|
|
35
|
+
if (url?.pathname) {
|
|
36
|
+
root.setAttributes({
|
|
37
|
+
[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
|
|
38
|
+
[util.SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE]: `${args.request.method} ${url.pathname}`,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return core.startSpan(
|
|
44
|
+
{
|
|
45
|
+
name,
|
|
46
|
+
...options,
|
|
47
|
+
attributes: {
|
|
48
|
+
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react-router',
|
|
49
|
+
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.loader',
|
|
50
|
+
...options.attributes,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
() => loaderFn(args),
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
exports.wrapServerLoader = wrapServerLoader;
|
|
59
|
+
//# sourceMappingURL=wrapServerLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapServerLoader.js","sources":["../../../src/server/wrapServerLoader.ts"],"sourcesContent":["import type { SpanAttributes } from '@sentry/core';\nimport {\n getActiveSpan,\n getRootSpan,\n parseStringToURLObject,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n spanToJSON,\n startSpan,\n} from '@sentry/core';\nimport type { LoaderFunctionArgs } from 'react-router';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util';\n\ntype SpanOptions = {\n name?: string;\n attributes?: SpanAttributes;\n};\n\n/**\n * Wraps a React Router server loader function with Sentry performance monitoring.\n * @param options - Optional span configuration options including name, operation, description and attributes\n * @param loaderFn - The server loader function to wrap\n *\n * @example\n * ```ts\n * // Wrap a loader function with custom span options\n * export const loader = wrapServerLoader(\n * {\n * name: 'Load Some Data',\n * description: 'Loads some data from the db',\n * },\n * async ({ params }) => {\n * // ... your loader logic\n * }\n * );\n * ```\n */\nexport function wrapServerLoader<T>(options: SpanOptions = {}, loaderFn: (args: LoaderFunctionArgs) => Promise<T>) {\n return async function (args: LoaderFunctionArgs) {\n const name = options.name || 'Executing Server Loader';\n const active = getActiveSpan();\n if (active) {\n const root = getRootSpan(active);\n // coming from auto.http.otel.http\n if (spanToJSON(root).description === 'GET') {\n const url = parseStringToURLObject(args.request.url);\n\n if (url?.pathname) {\n root.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE]: `${args.request.method} ${url.pathname}`,\n });\n }\n }\n }\n return startSpan(\n {\n name,\n ...options,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react-router',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.loader',\n ...options.attributes,\n },\n },\n () => loaderFn(args),\n );\n };\n}\n"],"names":["getActiveSpan","getRootSpan","spanToJSON","parseStringToURLObject","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE","startSpan","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_SENTRY_OP"],"mappings":";;;;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAI,OAAO,GAAgB,EAAE,EAAE,QAAQ,EAA4C;AACnH,EAAE,OAAO,gBAAgB,IAAI,EAAsB;AACnD,IAAI,MAAM,IAAK,GAAE,OAAO,CAAC,IAAA,IAAQ,yBAAyB;AAC1D,IAAI,MAAM,MAAA,GAASA,kBAAa,EAAE;AAClC,IAAI,IAAI,MAAM,EAAE;AAChB,MAAM,MAAM,IAAK,GAAEC,gBAAW,CAAC,MAAM,CAAC;AACtC;AACA,MAAM,IAAIC,eAAU,CAAC,IAAI,CAAC,CAAC,WAAA,KAAgB,KAAK,EAAE;AAClD,QAAQ,MAAM,GAAI,GAAEC,2BAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;;AAE5D,QAAQ,IAAI,GAAG,EAAE,QAAQ,EAAE;AAC3B,UAAU,IAAI,CAAC,aAAa,CAAC;AAC7B,YAAY,CAACC,qCAAgC,GAAG,KAAK;AACrD,YAAY,CAACC,wCAAmC,GAAG,CAAC,EAAA,IAAA,CAAA,OAAA,CAAA,MAAA,CAAA,CAAA,EAAA,GAAA,CAAA,QAAA,CAAA,CAAA;AACA,WAAA,CAAA;AACA;AACA;AACA;AACA,IAAA,OAAAC,cAAA;AACA,MAAA;AACA,QAAA,IAAA;AACA,QAAA,GAAA,OAAA;AACA,QAAA,UAAA,EAAA;AACA,UAAA,CAAAC,qCAAA,GAAA,wBAAA;AACA,UAAA,CAAAC,iCAAA,GAAA,8BAAA;AACA,UAAA,GAAA,OAAA,CAAA,UAAA;AACA,SAAA;AACA,OAAA;AACA,MAAA,MAAA,QAAA,CAAA,IAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA;;;;"}
|
|
@@ -14,6 +14,7 @@ async function makeCustomSentryVitePlugins(options) {
|
|
|
14
14
|
org,
|
|
15
15
|
project,
|
|
16
16
|
telemetry,
|
|
17
|
+
reactComponentAnnotation,
|
|
17
18
|
release,
|
|
18
19
|
} = options;
|
|
19
20
|
|
|
@@ -30,6 +31,11 @@ async function makeCustomSentryVitePlugins(options) {
|
|
|
30
31
|
},
|
|
31
32
|
...unstable_sentryVitePluginOptions?._metaOptions,
|
|
32
33
|
},
|
|
34
|
+
reactComponentAnnotation: {
|
|
35
|
+
enabled: reactComponentAnnotation?.enabled ?? undefined,
|
|
36
|
+
ignoredComponents: reactComponentAnnotation?.ignoredComponents ?? undefined,
|
|
37
|
+
...unstable_sentryVitePluginOptions?.reactComponentAnnotation,
|
|
38
|
+
},
|
|
33
39
|
release: {
|
|
34
40
|
...unstable_sentryVitePluginOptions?.release,
|
|
35
41
|
...release,
|
|
@@ -45,7 +51,13 @@ async function makeCustomSentryVitePlugins(options) {
|
|
|
45
51
|
// only use a subset of the plugins as all upload and file deletion tasks will be handled in the buildEnd hook
|
|
46
52
|
return [
|
|
47
53
|
...sentryVitePlugins.filter(plugin => {
|
|
48
|
-
return [
|
|
54
|
+
return [
|
|
55
|
+
'sentry-telemetry-plugin',
|
|
56
|
+
'sentry-vite-release-injection-plugin',
|
|
57
|
+
...(reactComponentAnnotation?.enabled || unstable_sentryVitePluginOptions?.reactComponentAnnotation?.enabled
|
|
58
|
+
? ['sentry-vite-component-name-annotate-plugin']
|
|
59
|
+
: []),
|
|
60
|
+
].includes(plugin.name);
|
|
49
61
|
}),
|
|
50
62
|
];
|
|
51
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeCustomSentryVitePlugins.js","sources":["../../../src/vite/makeCustomSentryVitePlugins.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/vite-plugin';\nimport { type Plugin } from 'vite';\nimport type { SentryReactRouterBuildOptions } from './types';\n\n/**\n * Create a custom subset of sentry's vite plugins\n */\nexport async function makeCustomSentryVitePlugins(options: SentryReactRouterBuildOptions): Promise<Plugin[]> {\n const {\n debug,\n unstable_sentryVitePluginOptions,\n bundleSizeOptimizations,\n authToken,\n org,\n project,\n telemetry,\n release,\n } = options;\n\n const sentryVitePlugins = sentryVitePlugin({\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n bundleSizeOptimizations,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n telemetry: telemetry ?? true,\n _metaOptions: {\n telemetry: {\n metaFramework: 'react-router',\n },\n ...unstable_sentryVitePluginOptions?._metaOptions,\n },\n release: {\n ...unstable_sentryVitePluginOptions?.release,\n ...release,\n },\n // will be handled in buildEnd hook\n sourcemaps: {\n disable: true,\n ...unstable_sentryVitePluginOptions?.sourcemaps,\n },\n ...unstable_sentryVitePluginOptions,\n }) as Plugin[];\n\n // only use a subset of the plugins as all upload and file deletion tasks will be handled in the buildEnd hook\n return [\n ...sentryVitePlugins.filter(plugin => {\n return ['sentry-telemetry-plugin'
|
|
1
|
+
{"version":3,"file":"makeCustomSentryVitePlugins.js","sources":["../../../src/vite/makeCustomSentryVitePlugins.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/vite-plugin';\nimport { type Plugin } from 'vite';\nimport type { SentryReactRouterBuildOptions } from './types';\n\n/**\n * Create a custom subset of sentry's vite plugins\n */\nexport async function makeCustomSentryVitePlugins(options: SentryReactRouterBuildOptions): Promise<Plugin[]> {\n const {\n debug,\n unstable_sentryVitePluginOptions,\n bundleSizeOptimizations,\n authToken,\n org,\n project,\n telemetry,\n reactComponentAnnotation,\n release,\n } = options;\n\n const sentryVitePlugins = sentryVitePlugin({\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n bundleSizeOptimizations,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n telemetry: telemetry ?? true,\n _metaOptions: {\n telemetry: {\n metaFramework: 'react-router',\n },\n ...unstable_sentryVitePluginOptions?._metaOptions,\n },\n reactComponentAnnotation: {\n enabled: reactComponentAnnotation?.enabled ?? undefined,\n ignoredComponents: reactComponentAnnotation?.ignoredComponents ?? undefined,\n ...unstable_sentryVitePluginOptions?.reactComponentAnnotation,\n },\n release: {\n ...unstable_sentryVitePluginOptions?.release,\n ...release,\n },\n // will be handled in buildEnd hook\n sourcemaps: {\n disable: true,\n ...unstable_sentryVitePluginOptions?.sourcemaps,\n },\n ...unstable_sentryVitePluginOptions,\n }) as Plugin[];\n\n // only use a subset of the plugins as all upload and file deletion tasks will be handled in the buildEnd hook\n return [\n ...sentryVitePlugins.filter(plugin => {\n return [\n 'sentry-telemetry-plugin',\n 'sentry-vite-release-injection-plugin',\n ...(reactComponentAnnotation?.enabled || unstable_sentryVitePluginOptions?.reactComponentAnnotation?.enabled\n ? ['sentry-vite-component-name-annotate-plugin']\n : []),\n ].includes(plugin.name);\n }),\n ];\n}\n"],"names":["sentryVitePlugin"],"mappings":";;;;AAIA;AACA;AACA;AACO,eAAe,2BAA2B,CAAC,OAAO,EAAoD;AAC7G,EAAE,MAAM;AACR,IAAI,KAAK;AACT,IAAI,gCAAgC;AACpC,IAAI,uBAAuB;AAC3B,IAAI,SAAS;AACb,IAAI,GAAG;AACP,IAAI,OAAO;AACX,IAAI,SAAS;AACb,IAAI,wBAAwB;AAC5B,IAAI,OAAO;AACX,GAAE,GAAI,OAAO;;AAEb,EAAE,MAAM,iBAAA,GAAoBA,2BAAgB,CAAC;AAC7C,IAAI,SAAS,EAAE,SAAU,IAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB;AACzD,IAAI,uBAAuB;AAC3B,IAAI,KAAK,EAAE,KAAM,IAAG,KAAK;AACzB,IAAI,GAAG,EAAE,GAAI,IAAG,OAAO,CAAC,GAAG,CAAC,UAAU;AACtC,IAAI,OAAO,EAAE,OAAQ,IAAG,OAAO,CAAC,GAAG,CAAC,cAAc;AAClD,IAAI,SAAS,EAAE,SAAU,IAAG,IAAI;AAChC,IAAI,YAAY,EAAE;AAClB,MAAM,SAAS,EAAE;AACjB,QAAQ,aAAa,EAAE,cAAc;AACrC,OAAO;AACP,MAAM,GAAG,gCAAgC,EAAE,YAAY;AACvD,KAAK;AACL,IAAI,wBAAwB,EAAE;AAC9B,MAAM,OAAO,EAAE,wBAAwB,EAAE,OAAA,IAAW,SAAS;AAC7D,MAAM,iBAAiB,EAAE,wBAAwB,EAAE,iBAAA,IAAqB,SAAS;AACjF,MAAM,GAAG,gCAAgC,EAAE,wBAAwB;AACnE,KAAK;AACL,IAAI,OAAO,EAAE;AACb,MAAM,GAAG,gCAAgC,EAAE,OAAO;AAClD,MAAM,GAAG,OAAO;AAChB,KAAK;AACL;AACA,IAAI,UAAU,EAAE;AAChB,MAAM,OAAO,EAAE,IAAI;AACnB,MAAM,GAAG,gCAAgC,EAAE,UAAU;AACrD,KAAK;AACL,IAAI,GAAG,gCAAgC;AACvC,GAAG,CAAE;;AAEL;AACA,EAAE,OAAO;AACT,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC,UAAU;AAC1C,MAAM,OAAO;AACb,QAAQ,yBAAyB;AACjC,QAAQ,sCAAsC;AAC9C,QAAQ,IAAI,wBAAwB,EAAE,WAAW,gCAAgC,EAAE,wBAAwB,EAAE;AAC7G,YAAY,CAAC,4CAA4C;AACzD,YAAY,EAAE,CAAC;AACf,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;AAC7B,KAAK,CAAC;AACN,GAAG;AACH;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from '@sentry/browser';
|
|
2
2
|
export { init } from './client/sdk.js';
|
|
3
3
|
export { reactRouterTracingIntegration } from './client/tracingIntegration.js';
|
|
4
|
+
export { ErrorBoundary, Profiler, captureReactException, reactErrorHandler, useProfiler, withErrorBoundary, withProfiler } from '@sentry/react';
|
|
4
5
|
//# sourceMappingURL=index.client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -2,6 +2,8 @@ export * from '@sentry/node';
|
|
|
2
2
|
export { init } from './server/sdk.js';
|
|
3
3
|
export { getMetaTagTransformer, sentryHandleRequest, wrapSentryHandleRequest } from './server/wrapSentryHandleRequest.js';
|
|
4
4
|
export { createSentryHandleRequest } from './server/createSentryHandleRequest.js';
|
|
5
|
+
export { wrapServerAction } from './server/wrapServerAction.js';
|
|
6
|
+
export { wrapServerLoader } from './server/wrapServerLoader.js';
|
|
5
7
|
export { sentryReactRouter } from './vite/plugin.js';
|
|
6
8
|
export { sentryOnBuildEnd } from './vite/buildEnd/handleOnBuildEnd.js';
|
|
7
9
|
export { makeConfigInjectorPlugin } from './vite/makeConfigInjectorPlugin.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"9.
|
|
1
|
+
{"type":"module","version":"9.27.0"}
|
package/build/esm/server/sdk.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';
|
|
2
2
|
import { logger, applySdkMetadata, setTag, getGlobalScope } from '@sentry/core';
|
|
3
|
-
import { init as init$1, getDefaultIntegrations } from '@sentry/node';
|
|
3
|
+
import { init as init$1, getDefaultIntegrations, NODE_VERSION } from '@sentry/node';
|
|
4
4
|
import { DEBUG_BUILD } from '../common/debug-build.js';
|
|
5
5
|
import { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util.js';
|
|
6
6
|
import { lowQualityTransactionsFilterIntegration } from './integration/lowQualityTransactionsFilterIntegration.js';
|
|
@@ -11,11 +11,16 @@ import { reactRouterServerIntegration } from './integration/reactRouterServer.js
|
|
|
11
11
|
* @param options The options for the SDK.
|
|
12
12
|
*/
|
|
13
13
|
function getDefaultReactRouterServerIntegrations(options) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const integrations = [...getDefaultIntegrations(options), lowQualityTransactionsFilterIntegration(options)];
|
|
15
|
+
|
|
16
|
+
if (
|
|
17
|
+
(NODE_VERSION.major === 20 && NODE_VERSION.minor < 19) || // https://nodejs.org/en/blog/release/v20.19.0
|
|
18
|
+
(NODE_VERSION.major === 22 && NODE_VERSION.minor < 12) // https://nodejs.org/en/blog/release/v22.12.0
|
|
19
|
+
) {
|
|
20
|
+
integrations.push(reactRouterServerIntegration());
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return integrations;
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport type { EventProcessor, Integration } from '@sentry/core';\nimport { applySdkMetadata, getGlobalScope, logger, setTag } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { getDefaultIntegrations as getNodeDefaultIntegrations, init as initNodeSdk } from '@sentry/node';\nimport { DEBUG_BUILD } from '../common/debug-build';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util';\nimport { lowQualityTransactionsFilterIntegration } from './integration/lowQualityTransactionsFilterIntegration';\nimport { reactRouterServerIntegration } from './integration/reactRouterServer';\n\n/**\n * Returns the default integrations for the React Router SDK.\n * @param options The options for the SDK.\n */\nexport function getDefaultReactRouterServerIntegrations(options: NodeOptions): Integration[] {\n
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport type { EventProcessor, Integration } from '@sentry/core';\nimport { applySdkMetadata, getGlobalScope, logger, setTag } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { getDefaultIntegrations as getNodeDefaultIntegrations, init as initNodeSdk, NODE_VERSION } from '@sentry/node';\nimport { DEBUG_BUILD } from '../common/debug-build';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util';\nimport { lowQualityTransactionsFilterIntegration } from './integration/lowQualityTransactionsFilterIntegration';\nimport { reactRouterServerIntegration } from './integration/reactRouterServer';\n\n/**\n * Returns the default integrations for the React Router SDK.\n * @param options The options for the SDK.\n */\nexport function getDefaultReactRouterServerIntegrations(options: NodeOptions): Integration[] {\n const integrations = [...getNodeDefaultIntegrations(options), lowQualityTransactionsFilterIntegration(options)];\n\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 integrations.push(reactRouterServerIntegration());\n }\n\n return integrations;\n}\n\n/**\n * Initializes the server side of the React Router SDK\n */\nexport function init(options: NodeOptions): NodeClient | undefined {\n const opts: NodeOptions = {\n ...options,\n defaultIntegrations: getDefaultReactRouterServerIntegrations(options),\n };\n\n DEBUG_BUILD && logger.log('Initializing SDK...');\n\n applySdkMetadata(opts, 'react-router', ['react-router', 'node']);\n\n const client = initNodeSdk(opts);\n\n setTag('runtime', 'node');\n\n // Overwrite the transaction name for instrumented data loaders because the trace data gets overwritten at a later point.\n // We only update the tx in case SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE got set in our instrumentation before.\n getGlobalScope().addEventProcessor(\n Object.assign(\n (event => {\n const overwrite = event.contexts?.trace?.data?.[SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE];\n if (\n event.type === 'transaction' &&\n (event.transaction === 'GET *' || event.transaction === 'POST *') &&\n event.contexts?.trace?.data?.[ATTR_HTTP_ROUTE] === '*' &&\n overwrite\n ) {\n event.transaction = overwrite;\n event.contexts.trace.data[ATTR_HTTP_ROUTE] = 'url';\n }\n\n // always yeet this attribute into the void, as this should not reach the server\n delete event.contexts?.trace?.data?.[SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE];\n\n return event;\n }) satisfies EventProcessor,\n { id: 'ReactRouterTransactionEnhancer' },\n ),\n );\n\n DEBUG_BUILD && logger.log('SDK successfully initialized');\n\n return client;\n}\n"],"names":["getNodeDefaultIntegrations","initNodeSdk"],"mappings":";;;;;;;;AAUA;AACA;AACA;AACA;AACO,SAAS,uCAAuC,CAAC,OAAO,EAA8B;AAC7F,EAAE,MAAM,YAAA,GAAe,CAAC,GAAGA,sBAA0B,CAAC,OAAO,CAAC,EAAE,uCAAuC,CAAC,OAAO,CAAC,CAAC;;AAEjH,EAAE;AACF,IAAI,CAAC,YAAY,CAAC,KAAA,KAAU,EAAA,IAAM,YAAY,CAAC,KAAA,GAAQ,EAAE;AACzD,KAAK,YAAY,CAAC,KAAM,KAAI,EAAG,IAAG,YAAY,CAAC,KAAM,GAAE,EAAE,CAAA;AACzD,IAAI;AACJ,IAAI,YAAY,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC;AACrD;;AAEA,EAAE,OAAO,YAAY;AACrB;;AAEA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAuC;AACnE,EAAE,MAAM,IAAI,GAAgB;AAC5B,IAAI,GAAG,OAAO;AACd,IAAI,mBAAmB,EAAE,uCAAuC,CAAC,OAAO,CAAC;AACzE,GAAG;;AAEH,EAAE,eAAe,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC;;AAElD,EAAE,gBAAgB,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;;AAElE,EAAE,MAAM,MAAO,GAAEC,MAAW,CAAC,IAAI,CAAC;;AAElC,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC;;AAE3B;AACA;AACA,EAAE,cAAc,EAAE,CAAC,iBAAiB;AACpC,IAAI,MAAM,CAAC,MAAM;AACjB,OAAO,SAAS;AAChB,QAAQ,MAAM,SAAA,GAAY,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,GAAG,mCAAmC,CAAC;AAC5F,QAAQ;AACR,UAAU,KAAK,CAAC,IAAK,KAAI,aAAc;AACvC,WAAW,KAAK,CAAC,WAAA,KAAgB,OAAA,IAAW,KAAK,CAAC,WAAA,KAAgB,QAAQ,CAAE;AAC5E,UAAU,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,GAAG,eAAe,CAAE,KAAI,GAAI;AACjE,UAAU;AACV,UAAU;AACV,UAAU,KAAK,CAAC,WAAY,GAAE,SAAS;AACvC,UAAU,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAE,GAAE,KAAK;AAC5D;;AAEA;AACA,QAAQ,OAAO,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,GAAG,mCAAmC,CAAC;;AAEjF,QAAQ,OAAO,KAAK;AACpB,OAAO;AACP,MAAM,EAAE,EAAE,EAAE,gCAAA,EAAkC;AAC9C,KAAK;AACL,GAAG;;AAEH,EAAE,eAAe,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC;;AAE3D,EAAE,OAAO,MAAM;AACf;;;;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { getActiveSpan, getRootSpan, spanToJSON, parseStringToURLObject, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, startSpan, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
|
|
2
|
+
import { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Wraps a React Router server action function with Sentry performance monitoring.
|
|
6
|
+
* @param options - Optional span configuration options including name, operation, description and attributes
|
|
7
|
+
* @param actionFn - The server action function to wrap
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // Wrap an action function with custom span options
|
|
12
|
+
* export const action = wrapServerAction(
|
|
13
|
+
* {
|
|
14
|
+
* name: 'Submit Form Data',
|
|
15
|
+
* description: 'Processes form submission data',
|
|
16
|
+
* },
|
|
17
|
+
* async ({ request }) => {
|
|
18
|
+
* // ... your action logic
|
|
19
|
+
* }
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
function wrapServerAction(options = {}, actionFn) {
|
|
24
|
+
return async function (args) {
|
|
25
|
+
const name = options.name || 'Executing Server Action';
|
|
26
|
+
const active = getActiveSpan();
|
|
27
|
+
if (active) {
|
|
28
|
+
const root = getRootSpan(active);
|
|
29
|
+
// coming from auto.http.otel.http
|
|
30
|
+
if (spanToJSON(root).description === 'POST') {
|
|
31
|
+
const url = parseStringToURLObject(args.request.url);
|
|
32
|
+
if (url?.pathname) {
|
|
33
|
+
root.setAttributes({
|
|
34
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
|
|
35
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE]: `${args.request.method} ${url.pathname}`,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return startSpan(
|
|
42
|
+
{
|
|
43
|
+
name,
|
|
44
|
+
...options,
|
|
45
|
+
attributes: {
|
|
46
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react-router',
|
|
47
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.action',
|
|
48
|
+
...options.attributes,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
() => actionFn(args),
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { wrapServerAction };
|
|
57
|
+
//# sourceMappingURL=wrapServerAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapServerAction.js","sources":["../../../src/server/wrapServerAction.ts"],"sourcesContent":["import type { SpanAttributes } from '@sentry/core';\nimport {\n getActiveSpan,\n getRootSpan,\n parseStringToURLObject,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n spanToJSON,\n startSpan,\n} from '@sentry/core';\nimport type { ActionFunctionArgs } from 'react-router';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util';\n\ntype SpanOptions = {\n name?: string;\n attributes?: SpanAttributes;\n};\n\n/**\n * Wraps a React Router server action function with Sentry performance monitoring.\n * @param options - Optional span configuration options including name, operation, description and attributes\n * @param actionFn - The server action function to wrap\n *\n * @example\n * ```ts\n * // Wrap an action function with custom span options\n * export const action = wrapServerAction(\n * {\n * name: 'Submit Form Data',\n * description: 'Processes form submission data',\n * },\n * async ({ request }) => {\n * // ... your action logic\n * }\n * );\n * ```\n */\nexport function wrapServerAction<T>(options: SpanOptions = {}, actionFn: (args: ActionFunctionArgs) => Promise<T>) {\n return async function (args: ActionFunctionArgs) {\n const name = options.name || 'Executing Server Action';\n const active = getActiveSpan();\n if (active) {\n const root = getRootSpan(active);\n // coming from auto.http.otel.http\n if (spanToJSON(root).description === 'POST') {\n const url = parseStringToURLObject(args.request.url);\n if (url?.pathname) {\n root.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE]: `${args.request.method} ${url.pathname}`,\n });\n }\n }\n }\n\n return startSpan(\n {\n name,\n ...options,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react-router',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.action',\n ...options.attributes,\n },\n },\n () => actionFn(args),\n );\n };\n}\n"],"names":[],"mappings":";;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAI,OAAO,GAAgB,EAAE,EAAE,QAAQ,EAA4C;AACnH,EAAE,OAAO,gBAAgB,IAAI,EAAsB;AACnD,IAAI,MAAM,IAAK,GAAE,OAAO,CAAC,IAAA,IAAQ,yBAAyB;AAC1D,IAAI,MAAM,MAAA,GAAS,aAAa,EAAE;AAClC,IAAI,IAAI,MAAM,EAAE;AAChB,MAAM,MAAM,IAAK,GAAE,WAAW,CAAC,MAAM,CAAC;AACtC;AACA,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,WAAA,KAAgB,MAAM,EAAE;AACnD,QAAQ,MAAM,GAAI,GAAE,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;AAC5D,QAAQ,IAAI,GAAG,EAAE,QAAQ,EAAE;AAC3B,UAAU,IAAI,CAAC,aAAa,CAAC;AAC7B,YAAY,CAAC,gCAAgC,GAAG,KAAK;AACrD,YAAY,CAAC,mCAAmC,GAAG,CAAC,EAAA,IAAA,CAAA,OAAA,CAAA,MAAA,CAAA,CAAA,EAAA,GAAA,CAAA,QAAA,CAAA,CAAA;AACA,WAAA,CAAA;AACA;AACA;AACA;;AAEA,IAAA,OAAA,SAAA;AACA,MAAA;AACA,QAAA,IAAA;AACA,QAAA,GAAA,OAAA;AACA,QAAA,UAAA,EAAA;AACA,UAAA,CAAA,gCAAA,GAAA,wBAAA;AACA,UAAA,CAAA,4BAAA,GAAA,8BAAA;AACA,UAAA,GAAA,OAAA,CAAA,UAAA;AACA,SAAA;AACA,OAAA;AACA,MAAA,MAAA,QAAA,CAAA,IAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA;;;;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { getActiveSpan, getRootSpan, spanToJSON, parseStringToURLObject, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, startSpan, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
|
|
2
|
+
import { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Wraps a React Router server loader function with Sentry performance monitoring.
|
|
6
|
+
* @param options - Optional span configuration options including name, operation, description and attributes
|
|
7
|
+
* @param loaderFn - The server loader function to wrap
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // Wrap a loader function with custom span options
|
|
12
|
+
* export const loader = wrapServerLoader(
|
|
13
|
+
* {
|
|
14
|
+
* name: 'Load Some Data',
|
|
15
|
+
* description: 'Loads some data from the db',
|
|
16
|
+
* },
|
|
17
|
+
* async ({ params }) => {
|
|
18
|
+
* // ... your loader logic
|
|
19
|
+
* }
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
function wrapServerLoader(options = {}, loaderFn) {
|
|
24
|
+
return async function (args) {
|
|
25
|
+
const name = options.name || 'Executing Server Loader';
|
|
26
|
+
const active = getActiveSpan();
|
|
27
|
+
if (active) {
|
|
28
|
+
const root = getRootSpan(active);
|
|
29
|
+
// coming from auto.http.otel.http
|
|
30
|
+
if (spanToJSON(root).description === 'GET') {
|
|
31
|
+
const url = parseStringToURLObject(args.request.url);
|
|
32
|
+
|
|
33
|
+
if (url?.pathname) {
|
|
34
|
+
root.setAttributes({
|
|
35
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
|
|
36
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE]: `${args.request.method} ${url.pathname}`,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return startSpan(
|
|
42
|
+
{
|
|
43
|
+
name,
|
|
44
|
+
...options,
|
|
45
|
+
attributes: {
|
|
46
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react-router',
|
|
47
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.loader',
|
|
48
|
+
...options.attributes,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
() => loaderFn(args),
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { wrapServerLoader };
|
|
57
|
+
//# sourceMappingURL=wrapServerLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapServerLoader.js","sources":["../../../src/server/wrapServerLoader.ts"],"sourcesContent":["import type { SpanAttributes } from '@sentry/core';\nimport {\n getActiveSpan,\n getRootSpan,\n parseStringToURLObject,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n spanToJSON,\n startSpan,\n} from '@sentry/core';\nimport type { LoaderFunctionArgs } from 'react-router';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE } from './instrumentation/util';\n\ntype SpanOptions = {\n name?: string;\n attributes?: SpanAttributes;\n};\n\n/**\n * Wraps a React Router server loader function with Sentry performance monitoring.\n * @param options - Optional span configuration options including name, operation, description and attributes\n * @param loaderFn - The server loader function to wrap\n *\n * @example\n * ```ts\n * // Wrap a loader function with custom span options\n * export const loader = wrapServerLoader(\n * {\n * name: 'Load Some Data',\n * description: 'Loads some data from the db',\n * },\n * async ({ params }) => {\n * // ... your loader logic\n * }\n * );\n * ```\n */\nexport function wrapServerLoader<T>(options: SpanOptions = {}, loaderFn: (args: LoaderFunctionArgs) => Promise<T>) {\n return async function (args: LoaderFunctionArgs) {\n const name = options.name || 'Executing Server Loader';\n const active = getActiveSpan();\n if (active) {\n const root = getRootSpan(active);\n // coming from auto.http.otel.http\n if (spanToJSON(root).description === 'GET') {\n const url = parseStringToURLObject(args.request.url);\n\n if (url?.pathname) {\n root.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE]: `${args.request.method} ${url.pathname}`,\n });\n }\n }\n }\n return startSpan(\n {\n name,\n ...options,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react-router',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.loader',\n ...options.attributes,\n },\n },\n () => loaderFn(args),\n );\n };\n}\n"],"names":[],"mappings":";;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAI,OAAO,GAAgB,EAAE,EAAE,QAAQ,EAA4C;AACnH,EAAE,OAAO,gBAAgB,IAAI,EAAsB;AACnD,IAAI,MAAM,IAAK,GAAE,OAAO,CAAC,IAAA,IAAQ,yBAAyB;AAC1D,IAAI,MAAM,MAAA,GAAS,aAAa,EAAE;AAClC,IAAI,IAAI,MAAM,EAAE;AAChB,MAAM,MAAM,IAAK,GAAE,WAAW,CAAC,MAAM,CAAC;AACtC;AACA,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,WAAA,KAAgB,KAAK,EAAE;AAClD,QAAQ,MAAM,GAAI,GAAE,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;;AAE5D,QAAQ,IAAI,GAAG,EAAE,QAAQ,EAAE;AAC3B,UAAU,IAAI,CAAC,aAAa,CAAC;AAC7B,YAAY,CAAC,gCAAgC,GAAG,KAAK;AACrD,YAAY,CAAC,mCAAmC,GAAG,CAAC,EAAA,IAAA,CAAA,OAAA,CAAA,MAAA,CAAA,CAAA,EAAA,GAAA,CAAA,QAAA,CAAA,CAAA;AACA,WAAA,CAAA;AACA;AACA;AACA;AACA,IAAA,OAAA,SAAA;AACA,MAAA;AACA,QAAA,IAAA;AACA,QAAA,GAAA,OAAA;AACA,QAAA,UAAA,EAAA;AACA,UAAA,CAAA,gCAAA,GAAA,wBAAA;AACA,UAAA,CAAA,4BAAA,GAAA,8BAAA;AACA,UAAA,GAAA,OAAA,CAAA,UAAA;AACA,SAAA;AACA,OAAA;AACA,MAAA,MAAA,QAAA,CAAA,IAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA;;;;"}
|
|
@@ -12,6 +12,7 @@ async function makeCustomSentryVitePlugins(options) {
|
|
|
12
12
|
org,
|
|
13
13
|
project,
|
|
14
14
|
telemetry,
|
|
15
|
+
reactComponentAnnotation,
|
|
15
16
|
release,
|
|
16
17
|
} = options;
|
|
17
18
|
|
|
@@ -28,6 +29,11 @@ async function makeCustomSentryVitePlugins(options) {
|
|
|
28
29
|
},
|
|
29
30
|
...unstable_sentryVitePluginOptions?._metaOptions,
|
|
30
31
|
},
|
|
32
|
+
reactComponentAnnotation: {
|
|
33
|
+
enabled: reactComponentAnnotation?.enabled ?? undefined,
|
|
34
|
+
ignoredComponents: reactComponentAnnotation?.ignoredComponents ?? undefined,
|
|
35
|
+
...unstable_sentryVitePluginOptions?.reactComponentAnnotation,
|
|
36
|
+
},
|
|
31
37
|
release: {
|
|
32
38
|
...unstable_sentryVitePluginOptions?.release,
|
|
33
39
|
...release,
|
|
@@ -43,7 +49,13 @@ async function makeCustomSentryVitePlugins(options) {
|
|
|
43
49
|
// only use a subset of the plugins as all upload and file deletion tasks will be handled in the buildEnd hook
|
|
44
50
|
return [
|
|
45
51
|
...sentryVitePlugins.filter(plugin => {
|
|
46
|
-
return [
|
|
52
|
+
return [
|
|
53
|
+
'sentry-telemetry-plugin',
|
|
54
|
+
'sentry-vite-release-injection-plugin',
|
|
55
|
+
...(reactComponentAnnotation?.enabled || unstable_sentryVitePluginOptions?.reactComponentAnnotation?.enabled
|
|
56
|
+
? ['sentry-vite-component-name-annotate-plugin']
|
|
57
|
+
: []),
|
|
58
|
+
].includes(plugin.name);
|
|
47
59
|
}),
|
|
48
60
|
];
|
|
49
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeCustomSentryVitePlugins.js","sources":["../../../src/vite/makeCustomSentryVitePlugins.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/vite-plugin';\nimport { type Plugin } from 'vite';\nimport type { SentryReactRouterBuildOptions } from './types';\n\n/**\n * Create a custom subset of sentry's vite plugins\n */\nexport async function makeCustomSentryVitePlugins(options: SentryReactRouterBuildOptions): Promise<Plugin[]> {\n const {\n debug,\n unstable_sentryVitePluginOptions,\n bundleSizeOptimizations,\n authToken,\n org,\n project,\n telemetry,\n release,\n } = options;\n\n const sentryVitePlugins = sentryVitePlugin({\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n bundleSizeOptimizations,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n telemetry: telemetry ?? true,\n _metaOptions: {\n telemetry: {\n metaFramework: 'react-router',\n },\n ...unstable_sentryVitePluginOptions?._metaOptions,\n },\n release: {\n ...unstable_sentryVitePluginOptions?.release,\n ...release,\n },\n // will be handled in buildEnd hook\n sourcemaps: {\n disable: true,\n ...unstable_sentryVitePluginOptions?.sourcemaps,\n },\n ...unstable_sentryVitePluginOptions,\n }) as Plugin[];\n\n // only use a subset of the plugins as all upload and file deletion tasks will be handled in the buildEnd hook\n return [\n ...sentryVitePlugins.filter(plugin => {\n return ['sentry-telemetry-plugin'
|
|
1
|
+
{"version":3,"file":"makeCustomSentryVitePlugins.js","sources":["../../../src/vite/makeCustomSentryVitePlugins.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/vite-plugin';\nimport { type Plugin } from 'vite';\nimport type { SentryReactRouterBuildOptions } from './types';\n\n/**\n * Create a custom subset of sentry's vite plugins\n */\nexport async function makeCustomSentryVitePlugins(options: SentryReactRouterBuildOptions): Promise<Plugin[]> {\n const {\n debug,\n unstable_sentryVitePluginOptions,\n bundleSizeOptimizations,\n authToken,\n org,\n project,\n telemetry,\n reactComponentAnnotation,\n release,\n } = options;\n\n const sentryVitePlugins = sentryVitePlugin({\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n bundleSizeOptimizations,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n telemetry: telemetry ?? true,\n _metaOptions: {\n telemetry: {\n metaFramework: 'react-router',\n },\n ...unstable_sentryVitePluginOptions?._metaOptions,\n },\n reactComponentAnnotation: {\n enabled: reactComponentAnnotation?.enabled ?? undefined,\n ignoredComponents: reactComponentAnnotation?.ignoredComponents ?? undefined,\n ...unstable_sentryVitePluginOptions?.reactComponentAnnotation,\n },\n release: {\n ...unstable_sentryVitePluginOptions?.release,\n ...release,\n },\n // will be handled in buildEnd hook\n sourcemaps: {\n disable: true,\n ...unstable_sentryVitePluginOptions?.sourcemaps,\n },\n ...unstable_sentryVitePluginOptions,\n }) as Plugin[];\n\n // only use a subset of the plugins as all upload and file deletion tasks will be handled in the buildEnd hook\n return [\n ...sentryVitePlugins.filter(plugin => {\n return [\n 'sentry-telemetry-plugin',\n 'sentry-vite-release-injection-plugin',\n ...(reactComponentAnnotation?.enabled || unstable_sentryVitePluginOptions?.reactComponentAnnotation?.enabled\n ? ['sentry-vite-component-name-annotate-plugin']\n : []),\n ].includes(plugin.name);\n }),\n ];\n}\n"],"names":[],"mappings":";;AAIA;AACA;AACA;AACO,eAAe,2BAA2B,CAAC,OAAO,EAAoD;AAC7G,EAAE,MAAM;AACR,IAAI,KAAK;AACT,IAAI,gCAAgC;AACpC,IAAI,uBAAuB;AAC3B,IAAI,SAAS;AACb,IAAI,GAAG;AACP,IAAI,OAAO;AACX,IAAI,SAAS;AACb,IAAI,wBAAwB;AAC5B,IAAI,OAAO;AACX,GAAE,GAAI,OAAO;;AAEb,EAAE,MAAM,iBAAA,GAAoB,gBAAgB,CAAC;AAC7C,IAAI,SAAS,EAAE,SAAU,IAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB;AACzD,IAAI,uBAAuB;AAC3B,IAAI,KAAK,EAAE,KAAM,IAAG,KAAK;AACzB,IAAI,GAAG,EAAE,GAAI,IAAG,OAAO,CAAC,GAAG,CAAC,UAAU;AACtC,IAAI,OAAO,EAAE,OAAQ,IAAG,OAAO,CAAC,GAAG,CAAC,cAAc;AAClD,IAAI,SAAS,EAAE,SAAU,IAAG,IAAI;AAChC,IAAI,YAAY,EAAE;AAClB,MAAM,SAAS,EAAE;AACjB,QAAQ,aAAa,EAAE,cAAc;AACrC,OAAO;AACP,MAAM,GAAG,gCAAgC,EAAE,YAAY;AACvD,KAAK;AACL,IAAI,wBAAwB,EAAE;AAC9B,MAAM,OAAO,EAAE,wBAAwB,EAAE,OAAA,IAAW,SAAS;AAC7D,MAAM,iBAAiB,EAAE,wBAAwB,EAAE,iBAAA,IAAqB,SAAS;AACjF,MAAM,GAAG,gCAAgC,EAAE,wBAAwB;AACnE,KAAK;AACL,IAAI,OAAO,EAAE;AACb,MAAM,GAAG,gCAAgC,EAAE,OAAO;AAClD,MAAM,GAAG,OAAO;AAChB,KAAK;AACL;AACA,IAAI,UAAU,EAAE;AAChB,MAAM,OAAO,EAAE,IAAI;AACnB,MAAM,GAAG,gCAAgC,EAAE,UAAU;AACrD,KAAK;AACL,IAAI,GAAG,gCAAgC;AACvC,GAAG,CAAE;;AAEL;AACA,EAAE,OAAO;AACT,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC,UAAU;AAC1C,MAAM,OAAO;AACb,QAAQ,yBAAyB;AACjC,QAAQ,sCAAsC;AAC9C,QAAQ,IAAI,wBAAwB,EAAE,WAAW,gCAAgC,EAAE,wBAAwB,EAAE;AAC7G,YAAY,CAAC,4CAA4C;AACzD,YAAY,EAAE,CAAC;AACf,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;AAC7B,KAAK,CAAC;AACN,GAAG;AACH;;;;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from '@sentry/browser';
|
|
2
2
|
export { init } from './sdk';
|
|
3
3
|
export { reactRouterTracingIntegration } from './tracingIntegration';
|
|
4
|
+
export { captureReactException, reactErrorHandler, Profiler, withProfiler, useProfiler, ErrorBoundary, withErrorBoundary, } from '@sentry/react';
|
|
5
|
+
export type { ErrorBoundaryProps, FallbackRender } from '@sentry/react';
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,aAAa,EACb,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -2,4 +2,6 @@ export * from '@sentry/node';
|
|
|
2
2
|
export { init } from './sdk';
|
|
3
3
|
export { wrapSentryHandleRequest, sentryHandleRequest, getMetaTagTransformer } from './wrapSentryHandleRequest';
|
|
4
4
|
export { createSentryHandleRequest, type SentryHandleRequestOptions } from './createSentryHandleRequest';
|
|
5
|
+
export { wrapServerAction } from './wrapServerAction';
|
|
6
|
+
export { wrapServerLoader } from './wrapServerLoader';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAChH,OAAO,EAAE,yBAAyB,EAAE,KAAK,0BAA0B,EAAE,MAAM,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAChH,OAAO,EAAE,yBAAyB,EAAE,KAAK,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/server/sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAO5D;;;GAGG;AACH,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/server/sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAO5D;;;GAGG;AACH,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,EAAE,CAW3F;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,CA0CjE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { SpanAttributes } from '@sentry/core';
|
|
2
|
+
import type { ActionFunctionArgs } from 'react-router';
|
|
3
|
+
type SpanOptions = {
|
|
4
|
+
name?: string;
|
|
5
|
+
attributes?: SpanAttributes;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Wraps a React Router server action function with Sentry performance monitoring.
|
|
9
|
+
* @param options - Optional span configuration options including name, operation, description and attributes
|
|
10
|
+
* @param actionFn - The server action function to wrap
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Wrap an action function with custom span options
|
|
15
|
+
* export const action = wrapServerAction(
|
|
16
|
+
* {
|
|
17
|
+
* name: 'Submit Form Data',
|
|
18
|
+
* description: 'Processes form submission data',
|
|
19
|
+
* },
|
|
20
|
+
* async ({ request }) => {
|
|
21
|
+
* // ... your action logic
|
|
22
|
+
* }
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function wrapServerAction<T>(options: SpanOptions | undefined, actionFn: (args: ActionFunctionArgs) => Promise<T>): (args: ActionFunctionArgs) => Promise<T>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=wrapServerAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapServerAction.d.ts","sourceRoot":"","sources":["../../../src/server/wrapServerAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAWnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,yBAAkB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,CAAC,CAAC,UAClF,kBAAkB,gBA8BhD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { SpanAttributes } from '@sentry/core';
|
|
2
|
+
import type { LoaderFunctionArgs } from 'react-router';
|
|
3
|
+
type SpanOptions = {
|
|
4
|
+
name?: string;
|
|
5
|
+
attributes?: SpanAttributes;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Wraps a React Router server loader function with Sentry performance monitoring.
|
|
9
|
+
* @param options - Optional span configuration options including name, operation, description and attributes
|
|
10
|
+
* @param loaderFn - The server loader function to wrap
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Wrap a loader function with custom span options
|
|
15
|
+
* export const loader = wrapServerLoader(
|
|
16
|
+
* {
|
|
17
|
+
* name: 'Load Some Data',
|
|
18
|
+
* description: 'Loads some data from the db',
|
|
19
|
+
* },
|
|
20
|
+
* async ({ params }) => {
|
|
21
|
+
* // ... your loader logic
|
|
22
|
+
* }
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function wrapServerLoader<T>(options: SpanOptions | undefined, loaderFn: (args: LoaderFunctionArgs) => Promise<T>): (args: LoaderFunctionArgs) => Promise<T>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=wrapServerLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapServerLoader.d.ts","sourceRoot":"","sources":["../../../src/server/wrapServerLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAWnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,yBAAkB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,CAAC,CAAC,UAClF,kBAAkB,gBA8BhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeCustomSentryVitePlugins.d.ts","sourceRoot":"","sources":["../../../src/vite/makeCustomSentryVitePlugins.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;GAEG;AACH,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"makeCustomSentryVitePlugins.d.ts","sourceRoot":"","sources":["../../../src/vite/makeCustomSentryVitePlugins.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;GAEG;AACH,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAuD3G"}
|
|
@@ -110,6 +110,23 @@ export type SentryReactRouterBuildOptions = {
|
|
|
110
110
|
* @default false.
|
|
111
111
|
*/
|
|
112
112
|
debug?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Options related to react component name annotations.
|
|
115
|
+
* Disabled by default, unless a value is set for this option.
|
|
116
|
+
* When enabled, your app's DOM will automatically be annotated during build-time with their respective component names.
|
|
117
|
+
* This will unlock the capability to search for Replays in Sentry by component name, as well as see component names in breadcrumbs and performance monitoring.
|
|
118
|
+
* Please note that this feature is not currently supported by the esbuild bundler plugins, and will only annotate React components
|
|
119
|
+
*/
|
|
120
|
+
reactComponentAnnotation?: {
|
|
121
|
+
/**
|
|
122
|
+
* Whether the component name annotate plugin should be enabled or not.
|
|
123
|
+
*/
|
|
124
|
+
enabled?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* A list of strings representing the names of components to ignore. The plugin will not apply `data-sentry` annotations on the DOM element for these components.
|
|
127
|
+
*/
|
|
128
|
+
ignoredComponents?: string[];
|
|
129
|
+
};
|
|
113
130
|
/**
|
|
114
131
|
* Options for the Sentry Vite plugin to customize the source maps upload process.
|
|
115
132
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/vite/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,KAAK,iBAAiB,GAAG;IACvB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;OAOG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAElD;;;;OAIG;IACH,OAAO,CAAC,EAAE;QACR;;;;;;;;;;WAUG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF,KAAK,6BAA6B,GAAG;IACnC;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,uBAAuB,CAAC,EAAE,6BAA6B,CAAC;IAExD;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,iBAAiB,CAAC;IAE5C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;;;OAYG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACrE,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/vite/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,KAAK,iBAAiB,GAAG;IACvB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;OAOG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAElD;;;;OAIG;IACH,OAAO,CAAC,EAAE;QACR;;;;;;;;;;WAUG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF,KAAK,6BAA6B,GAAG;IACnC;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,uBAAuB,CAAC,EAAE,6BAA6B,CAAC;IAExD;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;;OAMG;IACH,wBAAwB,CAAC,EAAE;QACzB;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB;;WAEG;QACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC9B,CAAC;IAEF;;;OAGG;IACH,uBAAuB,CAAC,EAAE,iBAAiB,CAAC;IAE5C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;;;OAYG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACrE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/react-router",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.27.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",
|
|
@@ -38,17 +38,18 @@
|
|
|
38
38
|
"@opentelemetry/core": "^1.30.1",
|
|
39
39
|
"@opentelemetry/instrumentation": "0.57.2",
|
|
40
40
|
"@opentelemetry/semantic-conventions": "^1.34.0",
|
|
41
|
-
"@sentry/browser": "9.
|
|
41
|
+
"@sentry/browser": "9.27.0",
|
|
42
42
|
"@sentry/cli": "^2.45.0",
|
|
43
|
-
"@sentry/core": "9.
|
|
44
|
-
"@sentry/node": "9.
|
|
43
|
+
"@sentry/core": "9.27.0",
|
|
44
|
+
"@sentry/node": "9.27.0",
|
|
45
|
+
"@sentry/react": "9.27.0",
|
|
45
46
|
"@sentry/vite-plugin": "^3.2.4",
|
|
46
47
|
"glob": "11.0.1"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@react-router/dev": "^7.
|
|
50
|
-
"@react-router/node": "^7.
|
|
51
|
-
"react-router": "^7.
|
|
50
|
+
"@react-router/dev": "^7.5.2",
|
|
51
|
+
"@react-router/node": "^7.5.2",
|
|
52
|
+
"react-router": "^7.5.2",
|
|
52
53
|
"vite": "^6.1.0"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|