@sentry/node 9.9.0 → 9.10.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 +2 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/anr/index.js +1 -1
- package/build/cjs/integrations/console.js +1 -1
- package/build/cjs/integrations/console.js.map +1 -1
- package/build/cjs/integrations/local-variables/local-variables-async.js +1 -1
- package/build/cjs/integrations/tracing/connect.js +1 -1
- package/build/cjs/integrations/tracing/connect.js.map +1 -1
- package/build/cjs/integrations/tracing/dataloader.js +24 -18
- package/build/cjs/integrations/tracing/dataloader.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool.js +16 -11
- package/build/cjs/integrations/tracing/genericPool.js.map +1 -1
- package/build/cjs/integrations/tracing/knex.js +14 -9
- package/build/cjs/integrations/tracing/knex.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma.js +19 -7
- package/build/cjs/integrations/tracing/prisma.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious.js +18 -13
- package/build/cjs/integrations/tracing/tedious.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +135 -134
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js +20 -5
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/cjs/log.js +200 -0
- package/build/cjs/log.js.map +1 -0
- package/build/cjs/otel/instrument.js +54 -3
- package/build/cjs/otel/instrument.js.map +1 -1
- package/build/cjs/sdk/index.js +15 -33
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/esm/index.js +2 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/anr/index.js +1 -1
- package/build/esm/integrations/anr/worker-script.js +2 -2
- package/build/esm/integrations/console.js +2 -2
- package/build/esm/integrations/console.js.map +1 -1
- 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/tracing/connect.js +1 -1
- package/build/esm/integrations/tracing/connect.js.map +1 -1
- package/build/esm/integrations/tracing/dataloader.js +26 -20
- package/build/esm/integrations/tracing/dataloader.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool.js +17 -12
- package/build/esm/integrations/tracing/genericPool.js.map +1 -1
- package/build/esm/integrations/tracing/knex.js +15 -10
- package/build/esm/integrations/tracing/knex.js.map +1 -1
- package/build/esm/integrations/tracing/prisma.js +19 -7
- package/build/esm/integrations/tracing/prisma.js.map +1 -1
- package/build/esm/integrations/tracing/tedious.js +19 -14
- package/build/esm/integrations/tracing/tedious.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js +136 -135
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/instrumentation.js +21 -6
- package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/esm/log.js +193 -0
- package/build/esm/log.js.map +1 -0
- package/build/esm/otel/instrument.js +54 -4
- package/build/esm/otel/instrument.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/sdk/index.js +16 -34
- package/build/esm/sdk/index.js.map +1 -1
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/console.d.ts.map +1 -1
- package/build/types/integrations/http/index.d.ts +1 -1
- package/build/types/integrations/tracing/amqplib.d.ts +2 -1
- package/build/types/integrations/tracing/amqplib.d.ts.map +1 -1
- package/build/types/integrations/tracing/connect.d.ts +2 -1
- package/build/types/integrations/tracing/connect.d.ts.map +1 -1
- package/build/types/integrations/tracing/dataloader.d.ts +2 -1
- package/build/types/integrations/tracing/dataloader.d.ts.map +1 -1
- package/build/types/integrations/tracing/express.d.ts +4 -2
- package/build/types/integrations/tracing/express.d.ts.map +1 -1
- package/build/types/integrations/tracing/fastify.d.ts +2 -1
- package/build/types/integrations/tracing/fastify.d.ts.map +1 -1
- package/build/types/integrations/tracing/genericPool.d.ts +2 -1
- package/build/types/integrations/tracing/genericPool.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql.d.ts +1 -1
- package/build/types/integrations/tracing/hapi/index.d.ts +2 -1
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/kafka.d.ts +2 -1
- package/build/types/integrations/tracing/kafka.d.ts.map +1 -1
- package/build/types/integrations/tracing/knex.d.ts +2 -1
- package/build/types/integrations/tracing/knex.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa.d.ts +2 -1
- package/build/types/integrations/tracing/koa.d.ts.map +1 -1
- package/build/types/integrations/tracing/lrumemoizer.d.ts +2 -1
- package/build/types/integrations/tracing/lrumemoizer.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo.d.ts +2 -1
- package/build/types/integrations/tracing/mongo.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongoose.d.ts +2 -1
- package/build/types/integrations/tracing/mongoose.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql.d.ts +2 -1
- package/build/types/integrations/tracing/mysql.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql2.d.ts +2 -1
- package/build/types/integrations/tracing/mysql2.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres.d.ts +2 -1
- package/build/types/integrations/tracing/postgres.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma.d.ts +1 -1
- package/build/types/integrations/tracing/prisma.d.ts.map +1 -1
- package/build/types/integrations/tracing/tedious.d.ts +2 -1
- package/build/types/integrations/tracing/tedious.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/index.d.ts +2 -1
- package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +7 -1
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -1
- package/build/types/log.d.ts +151 -0
- package/build/types/log.d.ts.map +1 -0
- package/build/types/otel/instrument.d.ts +14 -1
- package/build/types/otel/instrument.d.ts.map +1 -1
- package/build/types/sdk/index.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +2 -0
- package/build/types-ts3.8/integrations/http/index.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/amqplib.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/connect.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/dataloader.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/express.d.ts +4 -2
- package/build/types-ts3.8/integrations/tracing/fastify.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/genericPool.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/graphql.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/kafka.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/knex.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/koa.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/lrumemoizer.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/mongo.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/mongoose.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/mysql.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/mysql2.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/postgres.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/prisma.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/tedious.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +2 -1
- package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +7 -1
- package/build/types-ts3.8/log.d.ts +158 -0
- package/build/types-ts3.8/otel/instrument.d.ts +14 -1
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { GenericPoolInstrumentation } from '@opentelemetry/instrumentation-generic-pool';
|
|
2
|
+
export declare const instrumentGenericPool: ((options?: unknown) => GenericPoolInstrumentation) & {
|
|
2
3
|
id: string;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
@@ -24,7 +24,7 @@ interface GraphqlOptions {
|
|
|
24
24
|
*/
|
|
25
25
|
useOperationNameForRootSpan?: boolean;
|
|
26
26
|
}
|
|
27
|
-
export declare const instrumentGraphql: ((options?: GraphqlOptions | undefined) =>
|
|
27
|
+
export declare const instrumentGraphql: ((options?: GraphqlOptions | undefined) => import("@opentelemetry/instrumentation").Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
|
|
28
28
|
id: string;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { HapiInstrumentation } from '@opentelemetry/instrumentation-hapi';
|
|
1
2
|
import { Server } from './types';
|
|
2
|
-
export declare const instrumentHapi: ((options?: unknown) =>
|
|
3
|
+
export declare const instrumentHapi: ((options?: unknown) => HapiInstrumentation) & {
|
|
3
4
|
id: string;
|
|
4
5
|
};
|
|
5
6
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { KafkaJsInstrumentation } from '@opentelemetry/instrumentation-kafkajs';
|
|
2
|
+
export declare const instrumentKafka: ((options?: unknown) => KafkaJsInstrumentation) & {
|
|
2
3
|
id: string;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { LruMemoizerInstrumentation } from '@opentelemetry/instrumentation-lru-memoizer';
|
|
2
|
+
export declare const instrumentLruMemoizer: ((options?: unknown) => LruMemoizerInstrumentation) & {
|
|
2
3
|
id: string;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { MongoDBInstrumentation } from '@opentelemetry/instrumentation-mongodb';
|
|
2
|
+
export declare const instrumentMongo: ((options?: unknown) => MongoDBInstrumentation) & {
|
|
2
3
|
id: string;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { MongooseInstrumentation } from '@opentelemetry/instrumentation-mongoose';
|
|
2
|
+
export declare const instrumentMongoose: ((options?: unknown) => MongooseInstrumentation) & {
|
|
2
3
|
id: string;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { MySQL2Instrumentation } from '@opentelemetry/instrumentation-mysql2';
|
|
2
|
+
export declare const instrumentMysql2: ((options?: unknown) => MySQL2Instrumentation) & {
|
|
2
3
|
id: string;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Instrumentation } from '@opentelemetry/instrumentation';
|
|
2
2
|
export declare const instrumentPrisma: ((options?: {
|
|
3
3
|
prismaInstrumentation?: Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig> | undefined;
|
|
4
|
-
} | undefined) =>
|
|
4
|
+
} | undefined) => Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
|
|
5
5
|
id: string;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { TediousInstrumentation } from '@opentelemetry/instrumentation-tedious';
|
|
2
|
+
export declare const instrumentTedious: ((options?: unknown) => TediousInstrumentation) & {
|
|
2
3
|
id: string;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { SentryVercelAiInstrumentation } from './instrumentation';
|
|
2
|
+
export declare const instrumentVercelAi: ((options?: unknown) => SentryVercelAiInstrumentation) & {
|
|
2
3
|
id: string;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
2
2
|
import { InstrumentationConfig, InstrumentationModuleDefinition } from '@opentelemetry/instrumentation';
|
|
3
|
-
export declare let sentryVercelAiPatched: boolean;
|
|
4
3
|
/**
|
|
5
4
|
* This detects is added by the Sentry Vercel AI Integration to detect if the integration should
|
|
6
5
|
* be enabled.
|
|
@@ -8,11 +7,18 @@ export declare let sentryVercelAiPatched: boolean;
|
|
|
8
7
|
* It also patches the `ai` module to enable Vercel AI telemetry automatically for all methods.
|
|
9
8
|
*/
|
|
10
9
|
export declare class SentryVercelAiInstrumentation extends InstrumentationBase {
|
|
10
|
+
private _isPatched;
|
|
11
|
+
private _callbacks;
|
|
11
12
|
constructor(config?: InstrumentationConfig);
|
|
12
13
|
/**
|
|
13
14
|
* Initializes the instrumentation by defining the modules to be patched.
|
|
14
15
|
*/
|
|
15
16
|
init(): InstrumentationModuleDefinition;
|
|
17
|
+
/**
|
|
18
|
+
* Call the provided callback when the module is patched.
|
|
19
|
+
* If it has already been patched, the callback will be called immediately.
|
|
20
|
+
*/
|
|
21
|
+
callWhenPatched(callback: () => void): void;
|
|
16
22
|
/**
|
|
17
23
|
* Patches module exports to enable Vercel AI telemetry.
|
|
18
24
|
*/
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { Log, ParameterizedString } from '@sentry/core';
|
|
2
|
+
type CaptureLogArgs = [
|
|
3
|
+
/*message*/ ParameterizedString,
|
|
4
|
+
/*attributes*/ Log['attributes']
|
|
5
|
+
] | [
|
|
6
|
+
/*messageTemplate*/ string,
|
|
7
|
+
/*messageParams*/ Array<unknown>,
|
|
8
|
+
/*attributes*/ Log['attributes']
|
|
9
|
+
];
|
|
10
|
+
/**
|
|
11
|
+
* @summary Capture a log with the `trace` level. Requires `_experiments.enableLogs` to be enabled.
|
|
12
|
+
*
|
|
13
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
*
|
|
17
|
+
* ```
|
|
18
|
+
* Sentry.logger.trace('Starting database connection', {
|
|
19
|
+
* database: 'users',
|
|
20
|
+
* connectionId: 'conn_123'
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example With template strings
|
|
25
|
+
*
|
|
26
|
+
* ```
|
|
27
|
+
* Sentry.logger.trace('Database connection %s established for %s',
|
|
28
|
+
* ['successful', 'users'],
|
|
29
|
+
* { connectionId: 'conn_123' }
|
|
30
|
+
* );
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function trace(...args: CaptureLogArgs): void;
|
|
34
|
+
/**
|
|
35
|
+
* @summary Capture a log with the `debug` level. Requires `_experiments.enableLogs` to be enabled.
|
|
36
|
+
*
|
|
37
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
*
|
|
41
|
+
* ```
|
|
42
|
+
* Sentry.logger.debug('Cache miss for user profile', {
|
|
43
|
+
* userId: 'user_123',
|
|
44
|
+
* cacheKey: 'profile:user_123'
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example With template strings
|
|
49
|
+
*
|
|
50
|
+
* ```
|
|
51
|
+
* Sentry.logger.debug('Cache %s for %s: %s',
|
|
52
|
+
* ['miss', 'user profile', 'key not found'],
|
|
53
|
+
* { userId: 'user_123' }
|
|
54
|
+
* );
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function debug(...args: CaptureLogArgs): void;
|
|
58
|
+
/**
|
|
59
|
+
* @summary Capture a log with the `info` level. Requires `_experiments.enableLogs` to be enabled.
|
|
60
|
+
*
|
|
61
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
*
|
|
65
|
+
* ```
|
|
66
|
+
* Sentry.logger.info('User profile updated', {
|
|
67
|
+
* userId: 'user_123',
|
|
68
|
+
* updatedFields: ['email', 'preferences']
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @example With template strings
|
|
73
|
+
*
|
|
74
|
+
* ```
|
|
75
|
+
* Sentry.logger.info('User %s updated their %s',
|
|
76
|
+
* ['John Doe', 'profile settings'],
|
|
77
|
+
* { userId: 'user_123' }
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare function info(...args: CaptureLogArgs): void;
|
|
82
|
+
/**
|
|
83
|
+
* @summary Capture a log with the `warn` level. Requires `_experiments.enableLogs` to be enabled.
|
|
84
|
+
*
|
|
85
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
*
|
|
89
|
+
* ```
|
|
90
|
+
* Sentry.logger.warn('Rate limit approaching', {
|
|
91
|
+
* endpoint: '/api/users',
|
|
92
|
+
* currentRate: '95/100',
|
|
93
|
+
* resetTime: '2024-03-20T10:00:00Z'
|
|
94
|
+
* });
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* @example With template strings
|
|
98
|
+
*
|
|
99
|
+
* ```
|
|
100
|
+
* Sentry.logger.warn('Rate limit %s for %s: %s',
|
|
101
|
+
* ['approaching', '/api/users', '95/100 requests'],
|
|
102
|
+
* { resetTime: '2024-03-20T10:00:00Z' }
|
|
103
|
+
* );
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
export declare function warn(...args: CaptureLogArgs): void;
|
|
107
|
+
/**
|
|
108
|
+
* @summary Capture a log with the `error` level. Requires `_experiments.enableLogs` to be enabled.
|
|
109
|
+
*
|
|
110
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
*
|
|
114
|
+
* ```
|
|
115
|
+
* Sentry.logger.error('Failed to process payment', {
|
|
116
|
+
* orderId: 'order_123',
|
|
117
|
+
* errorCode: 'PAYMENT_FAILED',
|
|
118
|
+
* amount: 99.99
|
|
119
|
+
* });
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* @example With template strings
|
|
123
|
+
*
|
|
124
|
+
* ```
|
|
125
|
+
* Sentry.logger.error('Payment processing failed for order %s: %s',
|
|
126
|
+
* ['order_123', 'insufficient funds'],
|
|
127
|
+
* { amount: 99.99 }
|
|
128
|
+
* );
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
export declare function error(...args: CaptureLogArgs): void;
|
|
132
|
+
/**
|
|
133
|
+
* @summary Capture a log with the `fatal` level. Requires `_experiments.enableLogs` to be enabled.
|
|
134
|
+
*
|
|
135
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
*
|
|
139
|
+
* ```
|
|
140
|
+
* Sentry.logger.fatal('Database connection pool exhausted', {
|
|
141
|
+
* database: 'users',
|
|
142
|
+
* activeConnections: 100,
|
|
143
|
+
* maxConnections: 100
|
|
144
|
+
* });
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* @example With template strings
|
|
148
|
+
*
|
|
149
|
+
* ```
|
|
150
|
+
* Sentry.logger.fatal('Database %s: %s connections active',
|
|
151
|
+
* ['connection pool exhausted', '100/100'],
|
|
152
|
+
* { database: 'users' }
|
|
153
|
+
* );
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
export declare function fatal(...args: CaptureLogArgs): void;
|
|
157
|
+
export { fmt } from '@sentry/core';
|
|
158
|
+
//# sourceMappingURL=log.d.ts.map
|
|
@@ -5,7 +5,20 @@ export declare const INSTRUMENTED: Record<string, Instrumentation>;
|
|
|
5
5
|
* Instrument an OpenTelemetry instrumentation once.
|
|
6
6
|
* This will skip running instrumentation again if it was already instrumented.
|
|
7
7
|
*/
|
|
8
|
-
export declare function generateInstrumentOnce<Options = unknown>(name: string, creator: (options?: Options) =>
|
|
8
|
+
export declare function generateInstrumentOnce<Options = unknown, InstrumentationInstance extends Instrumentation = Instrumentation>(name: string, creator: (options?: Options) => InstrumentationInstance): ((options?: Options) => InstrumentationInstance) & {
|
|
9
9
|
id: string;
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Ensure a given callback is called when the instrumentation is actually wrapping something.
|
|
13
|
+
* This can be used to ensure some logic is only called when the instrumentation is actually active.
|
|
14
|
+
*
|
|
15
|
+
* This function returns a function that can be invoked with a callback.
|
|
16
|
+
* This callback will either be invoked immediately
|
|
17
|
+
* (e.g. if the instrumentation was already wrapped, or if _wrap could not be patched),
|
|
18
|
+
* or once the instrumentation is actually wrapping something.
|
|
19
|
+
*
|
|
20
|
+
* Make sure to call this function right after adding the instrumentation, otherwise it may be too late!
|
|
21
|
+
* The returned callback can be used any time, and also multiple times.
|
|
22
|
+
*/
|
|
23
|
+
export declare function instrumentWhenWrapped<T extends Instrumentation>(instrumentation: T): (callback: () => void) => void;
|
|
11
24
|
//# sourceMappingURL=instrument.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.10.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",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"@opentelemetry/sdk-trace-base": "^1.30.1",
|
|
97
97
|
"@opentelemetry/semantic-conventions": "^1.30.0",
|
|
98
98
|
"@prisma/instrumentation": "6.5.0",
|
|
99
|
-
"@sentry/core": "9.
|
|
100
|
-
"@sentry/opentelemetry": "9.
|
|
99
|
+
"@sentry/core": "9.10.0",
|
|
100
|
+
"@sentry/opentelemetry": "9.10.0",
|
|
101
101
|
"import-in-the-middle": "^1.13.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|