@sentry/nuxt 10.63.0 → 10.65.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/server/sdk.js +2 -2
- package/build/cjs/server/sdk.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/sdk.js +3 -3
- package/build/esm/server/sdk.js.map +1 -1
- package/build/module/module.json +1 -1
- package/build/module/runtime/hooks/updateRouteBeforeResponse.js +2 -2
- package/build/module/runtime/utils/instrumentStorage.js +5 -7
- package/build/types/runtime/utils/instrumentStorage.d.ts.map +1 -1
- package/build/types/server/sdk.d.ts.map +1 -1
- package/package.json +7 -7
package/build/cjs/server/sdk.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3
3
|
const path = require('node:path');
|
|
4
4
|
const core = require('@sentry/core');
|
|
5
5
|
const node = require('@sentry/node');
|
|
6
|
-
const nodeCore = require('@sentry/node-core');
|
|
7
6
|
const debugBuild = require('../common/debug-build.js');
|
|
8
7
|
|
|
9
8
|
function init(options) {
|
|
10
|
-
|
|
9
|
+
let envFallback;
|
|
10
|
+
envFallback = core.DEFAULT_ENVIRONMENT;
|
|
11
11
|
const sentryOptions = {
|
|
12
12
|
environment: options.environment ?? process.env.SENTRY_ENVIRONMENT ?? envFallback,
|
|
13
13
|
defaultIntegrations: getNuxtDefaultIntegrations(options),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import * as path from 'node:path';\nimport type { Client, Event, EventProcessor, Integration } from '@sentry/core';\nimport {\n applySdkMetadata,\n debug,\n DEFAULT_ENVIRONMENT,\n DEV_ENVIRONMENT,\n flush,\n getGlobalScope,\n vercelWaitUntil,\n} from '@sentry/core';\nimport {\n getDefaultIntegrations as getDefaultNodeIntegrations,\n httpIntegration,\n init as initNode,\n type NodeOptions,\n} from '@sentry/node';\nimport {
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import * as path from 'node:path';\nimport type { Client, Event, EventProcessor, Integration } from '@sentry/core';\nimport {\n applySdkMetadata,\n debug,\n DEFAULT_ENVIRONMENT,\n DEV_ENVIRONMENT,\n flush,\n getGlobalScope,\n vercelWaitUntil,\n} from '@sentry/core';\nimport {\n getDefaultIntegrations as getDefaultNodeIntegrations,\n httpIntegration,\n init as initNode,\n type NodeOptions,\n} from '@sentry/node';\nimport { DEBUG_BUILD } from '../common/debug-build';\nimport type { SentryNuxtServerOptions } from '../common/types';\n\n/**\n * Initializes the server-side of the Nuxt SDK\n *\n * @param options Configuration options for the SDK.\n */\nexport function init(options: SentryNuxtServerOptions): Client | undefined {\n let envFallback: string;\n /*! rollup-include-cjs-only */\n envFallback = DEFAULT_ENVIRONMENT;\n /*! rollup-include-cjs-only-end */\n\n /*! rollup-include-esm-only */\n envFallback = import.meta.dev ? DEV_ENVIRONMENT : DEFAULT_ENVIRONMENT;\n /*! rollup-include-esm-only-end */\n\n const sentryOptions = {\n environment: options.environment ?? process.env.SENTRY_ENVIRONMENT ?? envFallback,\n defaultIntegrations: getNuxtDefaultIntegrations(options),\n ...options,\n };\n\n applySdkMetadata(sentryOptions, 'nuxt', ['nuxt', 'node']);\n\n const client = initNode(sentryOptions);\n\n getGlobalScope().addEventProcessor(lowQualityTransactionsFilter(options));\n getGlobalScope().addEventProcessor(clientSourceMapErrorFilter(options));\n\n return client;\n}\n\n/**\n * Filter out transactions for resource requests which we don't want to send to Sentry\n * for quota reasons.\n *\n * Only exported for testing\n */\nexport function lowQualityTransactionsFilter(options: SentryNuxtServerOptions): EventProcessor {\n return Object.assign(\n (event => {\n if (event.type !== 'transaction' || !event.transaction || isCacheEvent(event)) {\n return event;\n }\n\n // Check if this looks like a parametrized route (contains :param or :param() patterns)\n const hasRouteParameters = /\\/:[^(/\\s]*(\\([^)]*\\))?[^/\\s]*/.test(event.transaction);\n\n if (hasRouteParameters) {\n return event;\n }\n\n // We don't want to send transaction for file requests, so everything ending with a *.someExtension should be filtered out\n // path.extname will return an empty string for normal page requests\n if (path.extname(event.transaction)) {\n options.debug &&\n DEBUG_BUILD &&\n debug.log('NuxtLowQualityTransactionsFilter filtered transaction: ', event.transaction);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'NuxtLowQualityTransactionsFilter' },\n );\n}\n\n/**\n * The browser devtools try to get the source maps, but as client source maps may not be available there is going to be an error (no problem for the application though).\n *\n * Only exported for testing\n */\nexport function clientSourceMapErrorFilter(options: SentryNuxtServerOptions): EventProcessor {\n return Object.assign(\n (event => {\n const errorMsg = event.exception?.values?.[0]?.value;\n if (errorMsg?.match(/^ENOENT: no such file or directory, open '.*\\/_nuxt\\/.*\\.js\\.map'/)) {\n options.debug && DEBUG_BUILD && debug.log('NuxtClientSourceMapErrorFilter filtered error: ', errorMsg);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'NuxtClientSourceMapErrorFilter' },\n );\n}\n\nfunction getNuxtDefaultIntegrations(options: NodeOptions): Integration[] {\n return [\n ...getDefaultNodeIntegrations(options).filter(integration => integration.name !== 'Http'),\n // The httpIntegration is added as defaultIntegration, so users can still overwrite it\n httpIntegration({\n instrumentation: {\n responseHook: () => {\n // Makes it possible to end the tracing span before closing the Vercel lambda (https://vercel.com/docs/functions/functions-api-reference#waituntil)\n vercelWaitUntil(flushSafelyWithTimeout());\n },\n },\n }),\n ];\n}\n\n/**\n * Flushes pending Sentry events with a 2-second timeout and in a way that cannot create unhandled promise rejections.\n */\nasync function flushSafelyWithTimeout(): Promise<void> {\n try {\n DEBUG_BUILD && debug.log('Flushing events...');\n await flush(2000);\n DEBUG_BUILD && debug.log('Done flushing events');\n } catch (e) {\n DEBUG_BUILD && debug.log('Error while flushing events:\\n', e);\n }\n}\n\n/**\n * Checks if the event is a cache event.\n */\nfunction isCacheEvent(e: Event): boolean {\n return e.contexts?.trace?.origin === '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BAAI,IAAAC,UAAA,CAAA,GAAA,CAAA,gCAAA,EAAA,CAAA,CAAA;AACF,EAAA;AACA;AACA,SAAA,YAAe,CAAA,CAAA,EAAM;AAA0B,EACjD,SAAS,QAAG,EAAA,KAAA,EAAA,MAAA,KAAA,iBAAA;AACV;;;;;;"}
|
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"10.
|
|
1
|
+
{"type":"module","version":"10.65.0"}
|
package/build/esm/server/sdk.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
|
-
import {
|
|
2
|
+
import { applySdkMetadata, getGlobalScope, debug, vercelWaitUntil, flush, DEV_ENVIRONMENT, DEFAULT_ENVIRONMENT } from '@sentry/core';
|
|
3
3
|
import { init as init$1, getDefaultIntegrations, httpIntegration } from '@sentry/node';
|
|
4
|
-
import { isCjs } from '@sentry/node-core';
|
|
5
4
|
import { DEBUG_BUILD } from '../common/debug-build.js';
|
|
6
5
|
|
|
7
6
|
function init(options) {
|
|
8
|
-
|
|
7
|
+
let envFallback;
|
|
8
|
+
envFallback = import.meta.dev ? DEV_ENVIRONMENT : DEFAULT_ENVIRONMENT;
|
|
9
9
|
const sentryOptions = {
|
|
10
10
|
environment: options.environment ?? process.env.SENTRY_ENVIRONMENT ?? envFallback,
|
|
11
11
|
defaultIntegrations: getNuxtDefaultIntegrations(options),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import * as path from 'node:path';\nimport type { Client, Event, EventProcessor, Integration } from '@sentry/core';\nimport {\n applySdkMetadata,\n debug,\n DEFAULT_ENVIRONMENT,\n DEV_ENVIRONMENT,\n flush,\n getGlobalScope,\n vercelWaitUntil,\n} from '@sentry/core';\nimport {\n getDefaultIntegrations as getDefaultNodeIntegrations,\n httpIntegration,\n init as initNode,\n type NodeOptions,\n} from '@sentry/node';\nimport {
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import * as path from 'node:path';\nimport type { Client, Event, EventProcessor, Integration } from '@sentry/core';\nimport {\n applySdkMetadata,\n debug,\n DEFAULT_ENVIRONMENT,\n DEV_ENVIRONMENT,\n flush,\n getGlobalScope,\n vercelWaitUntil,\n} from '@sentry/core';\nimport {\n getDefaultIntegrations as getDefaultNodeIntegrations,\n httpIntegration,\n init as initNode,\n type NodeOptions,\n} from '@sentry/node';\nimport { DEBUG_BUILD } from '../common/debug-build';\nimport type { SentryNuxtServerOptions } from '../common/types';\n\n/**\n * Initializes the server-side of the Nuxt SDK\n *\n * @param options Configuration options for the SDK.\n */\nexport function init(options: SentryNuxtServerOptions): Client | undefined {\n let envFallback: string;\n /*! rollup-include-cjs-only */\n envFallback = DEFAULT_ENVIRONMENT;\n /*! rollup-include-cjs-only-end */\n\n /*! rollup-include-esm-only */\n envFallback = import.meta.dev ? DEV_ENVIRONMENT : DEFAULT_ENVIRONMENT;\n /*! rollup-include-esm-only-end */\n\n const sentryOptions = {\n environment: options.environment ?? process.env.SENTRY_ENVIRONMENT ?? envFallback,\n defaultIntegrations: getNuxtDefaultIntegrations(options),\n ...options,\n };\n\n applySdkMetadata(sentryOptions, 'nuxt', ['nuxt', 'node']);\n\n const client = initNode(sentryOptions);\n\n getGlobalScope().addEventProcessor(lowQualityTransactionsFilter(options));\n getGlobalScope().addEventProcessor(clientSourceMapErrorFilter(options));\n\n return client;\n}\n\n/**\n * Filter out transactions for resource requests which we don't want to send to Sentry\n * for quota reasons.\n *\n * Only exported for testing\n */\nexport function lowQualityTransactionsFilter(options: SentryNuxtServerOptions): EventProcessor {\n return Object.assign(\n (event => {\n if (event.type !== 'transaction' || !event.transaction || isCacheEvent(event)) {\n return event;\n }\n\n // Check if this looks like a parametrized route (contains :param or :param() patterns)\n const hasRouteParameters = /\\/:[^(/\\s]*(\\([^)]*\\))?[^/\\s]*/.test(event.transaction);\n\n if (hasRouteParameters) {\n return event;\n }\n\n // We don't want to send transaction for file requests, so everything ending with a *.someExtension should be filtered out\n // path.extname will return an empty string for normal page requests\n if (path.extname(event.transaction)) {\n options.debug &&\n DEBUG_BUILD &&\n debug.log('NuxtLowQualityTransactionsFilter filtered transaction: ', event.transaction);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'NuxtLowQualityTransactionsFilter' },\n );\n}\n\n/**\n * The browser devtools try to get the source maps, but as client source maps may not be available there is going to be an error (no problem for the application though).\n *\n * Only exported for testing\n */\nexport function clientSourceMapErrorFilter(options: SentryNuxtServerOptions): EventProcessor {\n return Object.assign(\n (event => {\n const errorMsg = event.exception?.values?.[0]?.value;\n if (errorMsg?.match(/^ENOENT: no such file or directory, open '.*\\/_nuxt\\/.*\\.js\\.map'/)) {\n options.debug && DEBUG_BUILD && debug.log('NuxtClientSourceMapErrorFilter filtered error: ', errorMsg);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'NuxtClientSourceMapErrorFilter' },\n );\n}\n\nfunction getNuxtDefaultIntegrations(options: NodeOptions): Integration[] {\n return [\n ...getDefaultNodeIntegrations(options).filter(integration => integration.name !== 'Http'),\n // The httpIntegration is added as defaultIntegration, so users can still overwrite it\n httpIntegration({\n instrumentation: {\n responseHook: () => {\n // Makes it possible to end the tracing span before closing the Vercel lambda (https://vercel.com/docs/functions/functions-api-reference#waituntil)\n vercelWaitUntil(flushSafelyWithTimeout());\n },\n },\n }),\n ];\n}\n\n/**\n * Flushes pending Sentry events with a 2-second timeout and in a way that cannot create unhandled promise rejections.\n */\nasync function flushSafelyWithTimeout(): Promise<void> {\n try {\n DEBUG_BUILD && debug.log('Flushing events...');\n await flush(2000);\n DEBUG_BUILD && debug.log('Done flushing events');\n } catch (e) {\n DEBUG_BUILD && debug.log('Error while flushing events:\\n', e);\n }\n}\n\n/**\n * Checks if the event is a cache event.\n */\nfunction isCacheEvent(e: Event): boolean {\n return e.contexts?.trace?.origin === 'auto.cache.nuxt';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AACF,EAAA;AACA;AACA,SAAA,YAAe,CAAA,CAAA,EAAM;AAA0B,EACjD,SAAS,QAAG,EAAA,KAAA,EAAA,MAAA,KAAA,iBAAA;AACV;;;;"}
|
package/build/module/module.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { debug, getActiveSpan, getRootSpan, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from "@sentry/core";
|
|
1
|
+
import { isObjectLike, debug, getActiveSpan, getRootSpan, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from "@sentry/core";
|
|
2
2
|
function getMatchedRoutePath(event) {
|
|
3
3
|
const matchedRoute = event.context.matchedRoute;
|
|
4
4
|
return matchedRoute?.path ?? matchedRoute?.route;
|
|
@@ -26,7 +26,7 @@ export function updateRouteBeforeResponse(event) {
|
|
|
26
26
|
"http.route": matchedRoutePath
|
|
27
27
|
});
|
|
28
28
|
const params = event.context?.params;
|
|
29
|
-
if (params
|
|
29
|
+
if (isObjectLike(params)) {
|
|
30
30
|
Object.entries(params).forEach(([key, value]) => {
|
|
31
31
|
rootSpan.setAttributes({
|
|
32
32
|
[`url.path.parameter.${key}`]: String(value),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
isObjectLike,
|
|
2
3
|
captureException,
|
|
3
4
|
debug,
|
|
4
5
|
flushIfServerless,
|
|
@@ -99,9 +100,6 @@ function wrapStorageMount(storage) {
|
|
|
99
100
|
function normalizeMethodName(methodName) {
|
|
100
101
|
return methodName.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
|
|
101
102
|
}
|
|
102
|
-
function isEmptyValue(value) {
|
|
103
|
-
return value === null || value === void 0;
|
|
104
|
-
}
|
|
105
103
|
function createSpanStartOptions(methodName, driver, mountBase, args) {
|
|
106
104
|
const keys = getCacheKeys(args?.[0], mountBase);
|
|
107
105
|
const attributes = {
|
|
@@ -127,15 +125,15 @@ function normalizeKey(key, prefix) {
|
|
|
127
125
|
if (typeof key === "string") {
|
|
128
126
|
return `${prefix}${key}`;
|
|
129
127
|
}
|
|
130
|
-
if (
|
|
128
|
+
if (isObjectLike(key) && "key" in key) {
|
|
131
129
|
return `${prefix}${key.key}`;
|
|
132
130
|
}
|
|
133
|
-
return `${prefix}${
|
|
131
|
+
return `${prefix}${key == null ? "" : String(key)}`;
|
|
134
132
|
}
|
|
135
133
|
const CACHED_FN_HANDLERS_RE = /^nitro:(functions|handlers):/i;
|
|
136
134
|
function isCacheHit(key, value) {
|
|
137
135
|
try {
|
|
138
|
-
const isEmpty =
|
|
136
|
+
const isEmpty = value == null;
|
|
139
137
|
if (isEmpty || typeof key !== "string" || !CACHED_FN_HANDLERS_RE.test(key)) {
|
|
140
138
|
return !isEmpty;
|
|
141
139
|
}
|
|
@@ -145,7 +143,7 @@ function isCacheHit(key, value) {
|
|
|
145
143
|
}
|
|
146
144
|
}
|
|
147
145
|
function validateCacheEntry(key, entry) {
|
|
148
|
-
if (
|
|
146
|
+
if (entry.value == null) {
|
|
149
147
|
return false;
|
|
150
148
|
}
|
|
151
149
|
if (Date.now() > (entry.expires || 0)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentStorage.d.ts","sourceRoot":"","sources":["../../../../src/runtime/utils/instrumentStorage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instrumentStorage.d.ts","sourceRoot":"","sources":["../../../../src/runtime/utils/instrumentStorage.ts"],"names":[],"mappings":"AAyDA;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6B/G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/server/sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAS,cAAc,EAAe,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/server/sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAS,cAAc,EAAe,MAAM,cAAc,CAAC;AAiB/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,GAAG,SAAS,CAwBzE;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,uBAAuB,GAAG,cAAc,CA0B7F;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,GAAG,cAAc,CAY3F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/nuxt",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.65.0",
|
|
4
4
|
"description": "Official Sentry SDK for Nuxt",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nuxt",
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@nuxt/kit": "^3.13.2",
|
|
58
|
-
"@sentry/browser": "10.
|
|
59
|
-
"@sentry/cloudflare": "10.
|
|
60
|
-
"@sentry/core": "10.
|
|
61
|
-
"@sentry/node": "10.
|
|
62
|
-
"@sentry/node-core": "10.
|
|
58
|
+
"@sentry/browser": "10.65.0",
|
|
59
|
+
"@sentry/cloudflare": "10.65.0",
|
|
60
|
+
"@sentry/core": "10.65.0",
|
|
61
|
+
"@sentry/node": "10.65.0",
|
|
62
|
+
"@sentry/node-core": "10.65.0",
|
|
63
63
|
"@sentry/rollup-plugin": "^5.3.0",
|
|
64
64
|
"@sentry/vite-plugin": "^5.3.0",
|
|
65
|
-
"@sentry/vue": "10.
|
|
65
|
+
"@sentry/vue": "10.65.0",
|
|
66
66
|
"local-pkg": "^1.1.2"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|