@sentry/node 8.42.0 → 8.44.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.js +1 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/anr/index.js +26 -1
- package/build/cjs/integrations/anr/index.js.map +1 -1
- package/build/cjs/integrations/http/SentryHttpInstrumentation.js +4 -2
- package/build/cjs/integrations/http/SentryHttpInstrumentation.js.map +1 -1
- package/build/cjs/integrations/http/index.js +13 -9
- package/build/cjs/integrations/http/index.js.map +1 -1
- package/build/cjs/integrations/http/vendor/getRequestInfo.js +130 -0
- package/build/cjs/integrations/http/vendor/getRequestInfo.js.map +1 -0
- package/build/cjs/integrations/local-variables/local-variables-async.js +1 -1
- package/build/cjs/integrations/onunhandledrejection.js +2 -8
- package/build/cjs/integrations/onunhandledrejection.js.map +1 -1
- package/build/cjs/integrations/tracing/express.js +2 -0
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +5 -2
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/nest/nest.js +9 -2
- package/build/cjs/integrations/tracing/nest/nest.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +202 -0
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -0
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js +75 -0
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -0
- package/build/cjs/sdk/index.js +7 -2
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +30 -5
- package/build/cjs/sdk/initOtel.js.map +1 -1
- package/build/cjs/utils/errorhandling.js.map +1 -1
- package/build/cjs/utils/module.js +8 -10
- package/build/cjs/utils/module.js.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/integrations/anr/index.js +27 -3
- package/build/esm/integrations/anr/index.js.map +1 -1
- package/build/esm/integrations/anr/worker-script.js +2 -2
- package/build/esm/integrations/http/SentryHttpInstrumentation.js +4 -2
- package/build/esm/integrations/http/SentryHttpInstrumentation.js.map +1 -1
- package/build/esm/integrations/http/index.js +13 -9
- package/build/esm/integrations/http/index.js.map +1 -1
- package/build/esm/integrations/http/vendor/getRequestInfo.js +128 -0
- package/build/esm/integrations/http/vendor/getRequestInfo.js.map +1 -0
- package/build/esm/integrations/local-variables/local-variables-async.js +1 -1
- package/build/esm/integrations/local-variables/worker-script.js +2 -2
- package/build/esm/integrations/onunhandledrejection.js +2 -8
- package/build/esm/integrations/onunhandledrejection.js.map +1 -1
- package/build/esm/integrations/tracing/express.js +2 -0
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +3 -0
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/nest/nest.js +9 -2
- package/build/esm/integrations/tracing/nest/nest.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js +196 -0
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -0
- package/build/esm/integrations/tracing/vercelai/instrumentation.js +73 -0
- package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -0
- package/build/esm/package.json +1 -1
- package/build/esm/sdk/index.js +7 -2
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +30 -6
- package/build/esm/sdk/initOtel.js.map +1 -1
- package/build/esm/utils/errorhandling.js.map +1 -1
- package/build/esm/utils/module.js +8 -10
- package/build/esm/utils/module.js.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/anr/index.d.ts +2 -0
- package/build/types/integrations/anr/index.d.ts.map +1 -1
- package/build/types/integrations/http/SentryHttpInstrumentation.d.ts.map +1 -1
- package/build/types/integrations/http/index.d.ts +9 -0
- package/build/types/integrations/http/index.d.ts.map +1 -1
- package/build/types/integrations/http/vendor/getRequestInfo.d.ts +21 -0
- package/build/types/integrations/http/vendor/getRequestInfo.d.ts.map +1 -0
- package/build/types/integrations/tracing/express.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/nest/nest.d.ts.map +1 -1
- package/build/types/integrations/tracing/nest/types.d.ts +14 -6
- package/build/types/integrations/tracing/nest/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/index.d.ts +40 -0
- package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +21 -0
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/vercelai/types.d.ts +38 -0
- package/build/types/integrations/tracing/vercelai/types.d.ts.map +1 -0
- package/build/types/sdk/index.d.ts.map +1 -1
- package/build/types/sdk/initOtel.d.ts +2 -0
- package/build/types/sdk/initOtel.d.ts.map +1 -1
- package/build/types/utils/errorhandling.d.ts +1 -1
- package/build/types/utils/errorhandling.d.ts.map +1 -1
- package/build/types/utils/module.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +1 -1
- package/build/types-ts3.8/integrations/anr/index.d.ts +2 -0
- package/build/types-ts3.8/integrations/http/index.d.ts +9 -0
- package/build/types-ts3.8/integrations/http/vendor/getRequestInfo.d.ts +21 -0
- package/build/types-ts3.8/integrations/tracing/nest/types.d.ts +14 -6
- package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +40 -0
- package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +21 -0
- package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +38 -0
- package/build/types-ts3.8/sdk/initOtel.d.ts +2 -0
- package/build/types-ts3.8/utils/errorhandling.d.ts +1 -1
- package/package.json +33 -33
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
interface FastifyRequest {
|
|
2
|
+
routeOptions?: {
|
|
3
|
+
method?: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
interface ExpressRequest {
|
|
8
|
+
route?: {
|
|
9
|
+
path?: string;
|
|
10
|
+
};
|
|
11
|
+
method?: string;
|
|
12
|
+
}
|
|
1
13
|
export interface MinimalNestJsExecutionContext {
|
|
2
14
|
getType: () => string;
|
|
3
15
|
switchToHttp: () => {
|
|
4
|
-
getRequest: () =>
|
|
5
|
-
route?: {
|
|
6
|
-
path?: string;
|
|
7
|
-
};
|
|
8
|
-
method?: string;
|
|
9
|
-
};
|
|
16
|
+
getRequest: () => FastifyRequest | ExpressRequest;
|
|
10
17
|
};
|
|
11
18
|
_sentryInterceptorInstrumented?: boolean;
|
|
12
19
|
}
|
|
@@ -73,4 +80,5 @@ export interface OnEventTarget {
|
|
|
73
80
|
* Represents an express NextFunction.
|
|
74
81
|
*/
|
|
75
82
|
export type NextFunction = (err?: any) => void;
|
|
83
|
+
export {};
|
|
76
84
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const instrumentVercelAi: ((options?: unknown) => void) & {
|
|
2
|
+
id: string;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.
|
|
6
|
+
*
|
|
7
|
+
* For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```javascript
|
|
11
|
+
* const Sentry = require('@sentry/node');
|
|
12
|
+
*
|
|
13
|
+
* Sentry.init({
|
|
14
|
+
* integrations: [Sentry.vercelAIIntegration()],
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* By default this integration adds tracing support to all `ai` function calls. If you need to disable
|
|
19
|
+
* collecting spans for a specific call, you can do so by setting `experimental_telemetry.isEnabled` to
|
|
20
|
+
* `false` in the first argument of the function call.
|
|
21
|
+
*
|
|
22
|
+
* ```javascript
|
|
23
|
+
* const result = await generateText({
|
|
24
|
+
* model: openai('gpt-4-turbo'),
|
|
25
|
+
* experimental_telemetry: { isEnabled: false },
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each
|
|
30
|
+
* function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`
|
|
31
|
+
* to `true`.
|
|
32
|
+
*
|
|
33
|
+
* ```javascript
|
|
34
|
+
* const result = await generateText({
|
|
35
|
+
* model: openai('gpt-4-turbo'),
|
|
36
|
+
* experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },
|
|
37
|
+
* });
|
|
38
|
+
*/
|
|
39
|
+
export declare const vercelAIIntegration: () => import("@sentry/core").Integration;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { InstrumentationConfig, InstrumentationModuleDefinition } from '@opentelemetry/instrumentation';
|
|
3
|
+
export declare let sentryVercelAiPatched: boolean;
|
|
4
|
+
/**
|
|
5
|
+
* This detects is added by the Sentry Vercel AI Integration to detect if the integration should
|
|
6
|
+
* be enabled.
|
|
7
|
+
*
|
|
8
|
+
* It also patches the `ai` module to enable Vercel AI telemetry automatically for all methods.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SentryVercelAiInstrumentation extends InstrumentationBase {
|
|
11
|
+
constructor(config?: InstrumentationConfig);
|
|
12
|
+
/**
|
|
13
|
+
* Initializes the instrumentation by defining the modules to be patched.
|
|
14
|
+
*/
|
|
15
|
+
init(): InstrumentationModuleDefinition;
|
|
16
|
+
/**
|
|
17
|
+
* Patches module exports to enable Vercel AI telemetry.
|
|
18
|
+
*/
|
|
19
|
+
private _patch;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telemetry configuration.
|
|
3
|
+
*/
|
|
4
|
+
export type TelemetrySettings = {
|
|
5
|
+
/**
|
|
6
|
+
* Enable or disable telemetry. Disabled by default while experimental.
|
|
7
|
+
*/
|
|
8
|
+
isEnabled?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Enable or disable input recording. Enabled by default.
|
|
11
|
+
*
|
|
12
|
+
* You might want to disable input recording to avoid recording sensitive
|
|
13
|
+
* information, to reduce data transfers, or to increase performance.
|
|
14
|
+
*/
|
|
15
|
+
recordInputs?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Enable or disable output recording. Enabled by default.
|
|
18
|
+
*
|
|
19
|
+
* You might want to disable output recording to avoid recording sensitive
|
|
20
|
+
* information, to reduce data transfers, or to increase performance.
|
|
21
|
+
*/
|
|
22
|
+
recordOutputs?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Identifier for this function. Used to group telemetry data by function.
|
|
25
|
+
*/
|
|
26
|
+
functionId?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Additional information to include in the telemetry data.
|
|
29
|
+
*/
|
|
30
|
+
metadata?: Record<string, AttributeValue>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Attribute values may be any non-nullish primitive value except an object.
|
|
34
|
+
*
|
|
35
|
+
* null or undefined attribute values are invalid and will result in undefined behavior.
|
|
36
|
+
*/
|
|
37
|
+
export declare type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
|
|
38
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -20,5 +20,7 @@ interface NodePreloadOptions {
|
|
|
20
20
|
export declare function preloadOpenTelemetry(options?: NodePreloadOptions): void;
|
|
21
21
|
/** Just exported for tests. */
|
|
22
22
|
export declare function setupOtel(client: NodeClient): BasicTracerProvider;
|
|
23
|
+
/** Just exported for tests. */
|
|
24
|
+
export declare function _clampSpanProcessorTimeout(maxSpanWaitDuration: number | undefined): number | undefined;
|
|
23
25
|
export {};
|
|
24
26
|
//# sourceMappingURL=initOtel.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.44.0",
|
|
4
4
|
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
|
|
@@ -66,39 +66,39 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@opentelemetry/api": "^1.9.0",
|
|
69
|
-
"@opentelemetry/context-async-hooks": "^1.
|
|
70
|
-
"@opentelemetry/core": "^1.
|
|
71
|
-
"@opentelemetry/instrumentation": "^0.
|
|
72
|
-
"@opentelemetry/instrumentation-amqplib": "^0.
|
|
73
|
-
"@opentelemetry/instrumentation-connect": "0.
|
|
74
|
-
"@opentelemetry/instrumentation-dataloader": "0.
|
|
75
|
-
"@opentelemetry/instrumentation-express": "0.
|
|
76
|
-
"@opentelemetry/instrumentation-fastify": "0.
|
|
77
|
-
"@opentelemetry/instrumentation-fs": "0.
|
|
78
|
-
"@opentelemetry/instrumentation-generic-pool": "0.
|
|
79
|
-
"@opentelemetry/instrumentation-graphql": "0.
|
|
80
|
-
"@opentelemetry/instrumentation-hapi": "0.
|
|
81
|
-
"@opentelemetry/instrumentation-http": "0.
|
|
82
|
-
"@opentelemetry/instrumentation-ioredis": "0.
|
|
83
|
-
"@opentelemetry/instrumentation-kafkajs": "0.
|
|
84
|
-
"@opentelemetry/instrumentation-knex": "0.
|
|
85
|
-
"@opentelemetry/instrumentation-koa": "0.
|
|
86
|
-
"@opentelemetry/instrumentation-lru-memoizer": "0.
|
|
87
|
-
"@opentelemetry/instrumentation-mongodb": "0.
|
|
88
|
-
"@opentelemetry/instrumentation-mongoose": "0.
|
|
89
|
-
"@opentelemetry/instrumentation-mysql": "0.
|
|
90
|
-
"@opentelemetry/instrumentation-mysql2": "0.
|
|
91
|
-
"@opentelemetry/instrumentation-nestjs-core": "0.
|
|
92
|
-
"@opentelemetry/instrumentation-pg": "0.
|
|
93
|
-
"@opentelemetry/instrumentation-redis-4": "0.
|
|
94
|
-
"@opentelemetry/instrumentation-tedious": "0.
|
|
95
|
-
"@opentelemetry/instrumentation-undici": "0.
|
|
96
|
-
"@opentelemetry/resources": "^1.
|
|
97
|
-
"@opentelemetry/sdk-trace-base": "^1.
|
|
98
|
-
"@opentelemetry/semantic-conventions": "^1.
|
|
69
|
+
"@opentelemetry/context-async-hooks": "^1.29.0",
|
|
70
|
+
"@opentelemetry/core": "^1.29.0",
|
|
71
|
+
"@opentelemetry/instrumentation": "^0.56.0",
|
|
72
|
+
"@opentelemetry/instrumentation-amqplib": "^0.45.0",
|
|
73
|
+
"@opentelemetry/instrumentation-connect": "0.42.0",
|
|
74
|
+
"@opentelemetry/instrumentation-dataloader": "0.15.0",
|
|
75
|
+
"@opentelemetry/instrumentation-express": "0.46.0",
|
|
76
|
+
"@opentelemetry/instrumentation-fastify": "0.43.0",
|
|
77
|
+
"@opentelemetry/instrumentation-fs": "0.18.0",
|
|
78
|
+
"@opentelemetry/instrumentation-generic-pool": "0.42.0",
|
|
79
|
+
"@opentelemetry/instrumentation-graphql": "0.46.0",
|
|
80
|
+
"@opentelemetry/instrumentation-hapi": "0.44.0",
|
|
81
|
+
"@opentelemetry/instrumentation-http": "0.56.0",
|
|
82
|
+
"@opentelemetry/instrumentation-ioredis": "0.46.0",
|
|
83
|
+
"@opentelemetry/instrumentation-kafkajs": "0.6.0",
|
|
84
|
+
"@opentelemetry/instrumentation-knex": "0.43.0",
|
|
85
|
+
"@opentelemetry/instrumentation-koa": "0.46.0",
|
|
86
|
+
"@opentelemetry/instrumentation-lru-memoizer": "0.43.0",
|
|
87
|
+
"@opentelemetry/instrumentation-mongodb": "0.50.0",
|
|
88
|
+
"@opentelemetry/instrumentation-mongoose": "0.45.0",
|
|
89
|
+
"@opentelemetry/instrumentation-mysql": "0.44.0",
|
|
90
|
+
"@opentelemetry/instrumentation-mysql2": "0.44.0",
|
|
91
|
+
"@opentelemetry/instrumentation-nestjs-core": "0.43.0",
|
|
92
|
+
"@opentelemetry/instrumentation-pg": "0.49.0",
|
|
93
|
+
"@opentelemetry/instrumentation-redis-4": "0.45.0",
|
|
94
|
+
"@opentelemetry/instrumentation-tedious": "0.17.0",
|
|
95
|
+
"@opentelemetry/instrumentation-undici": "0.9.0",
|
|
96
|
+
"@opentelemetry/resources": "^1.29.0",
|
|
97
|
+
"@opentelemetry/sdk-trace-base": "^1.29.0",
|
|
98
|
+
"@opentelemetry/semantic-conventions": "^1.28.0",
|
|
99
99
|
"@prisma/instrumentation": "5.19.1",
|
|
100
|
-
"@sentry/core": "8.
|
|
101
|
-
"@sentry/opentelemetry": "8.
|
|
100
|
+
"@sentry/core": "8.44.0",
|
|
101
|
+
"@sentry/opentelemetry": "8.44.0",
|
|
102
102
|
"import-in-the-middle": "^1.11.2"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|