@sentry/node 9.12.0 → 9.13.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 +5 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/anr/index.js +3 -3
- package/build/cjs/integrations/anr/index.js.map +1 -1
- package/build/cjs/integrations/context.js +3 -3
- package/build/cjs/integrations/context.js.map +1 -1
- package/build/cjs/integrations/local-variables/local-variables-async.js +1 -1
- package/build/cjs/integrations/node-fetch/index.js +11 -7
- package/build/cjs/integrations/node-fetch/index.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql.js +31 -3
- package/build/cjs/integrations/tracing/graphql.js.map +1 -1
- package/build/cjs/integrations/winston.js +151 -0
- package/build/cjs/integrations/winston.js.map +1 -0
- package/build/cjs/logs/capture.js +29 -0
- package/build/cjs/logs/capture.js.map +1 -0
- package/build/cjs/{log.js → logs/exports.js} +8 -30
- package/build/cjs/logs/exports.js.map +1 -0
- package/build/cjs/otel/instrument.js +50 -2
- package/build/cjs/otel/instrument.js.map +1 -1
- package/build/cjs/sdk/index.js +1 -2
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/esm/index.js +4 -4
- package/build/esm/integrations/anr/index.js +1 -1
- package/build/esm/integrations/anr/worker-script.js +2 -2
- 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/node-fetch/index.js +11 -7
- package/build/esm/integrations/node-fetch/index.js.map +1 -1
- package/build/esm/integrations/tracing/express.js +1 -1
- package/build/esm/integrations/tracing/fastify.js +1 -1
- package/build/esm/integrations/tracing/graphql.js +32 -4
- package/build/esm/integrations/tracing/graphql.js.map +1 -1
- package/build/esm/integrations/tracing/koa.js +1 -1
- package/build/esm/integrations/winston.js +149 -0
- package/build/esm/integrations/winston.js.map +1 -0
- package/build/esm/logs/capture.js +27 -0
- package/build/esm/logs/capture.js.map +1 -0
- package/build/esm/{log.js → logs/exports.js} +2 -25
- package/build/esm/logs/exports.js.map +1 -0
- package/build/esm/otel/instrument.js +50 -2
- package/build/esm/otel/instrument.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/sdk/index.js +1 -2
- package/build/esm/sdk/index.js.map +1 -1
- package/build/types/index.d.ts +3 -3
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/node-fetch/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql.d.ts +2 -1
- package/build/types/integrations/tracing/graphql.d.ts.map +1 -1
- package/build/types/integrations/winston.d.ts +44 -0
- package/build/types/integrations/winston.d.ts.map +1 -0
- package/build/types/logs/capture.d.ts +11 -0
- package/build/types/logs/capture.d.ts.map +1 -0
- package/build/{types-ts3.8/log.d.ts → types/logs/exports.d.ts} +150 -158
- package/build/types/logs/exports.d.ts.map +1 -0
- package/build/types/otel/instrument.d.ts +3 -4
- package/build/types/otel/instrument.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +3 -3
- package/build/types-ts3.8/integrations/tracing/graphql.d.ts +2 -1
- package/build/types-ts3.8/integrations/winston.d.ts +44 -0
- package/build/types-ts3.8/logs/capture.d.ts +18 -0
- package/build/{types/log.d.ts → types-ts3.8/logs/exports.d.ts} +150 -151
- package/build/types-ts3.8/otel/instrument.d.ts +3 -4
- package/package.json +3 -3
- package/build/cjs/integrations/console.js +0 -37
- package/build/cjs/integrations/console.js.map +0 -1
- package/build/cjs/log.js.map +0 -1
- package/build/esm/integrations/console.js +0 -35
- package/build/esm/integrations/console.js.map +0 -1
- package/build/esm/log.js.map +0 -1
- package/build/types/integrations/console.d.ts +0 -5
- package/build/types/integrations/console.d.ts.map +0 -1
- package/build/types/log.d.ts.map +0 -1
- package/build/types-ts3.8/integrations/console.d.ts +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAShF,UAAU,cAAc;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAID,eAAO,MAAM,iBAAiB;;CAiD7B,CAAC;AAcF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,8EAAyC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { LogSeverityLevel } from '@sentry/core';
|
|
2
|
+
/**
|
|
3
|
+
* Options for the Sentry Winston transport.
|
|
4
|
+
*/
|
|
5
|
+
interface WinstonTransportOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Use this option to filter which levels should be captured. By default, all levels are captured.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const transport = Sentry.createSentryWinstonTransport(Transport, {
|
|
12
|
+
* // Only capture error and warn logs
|
|
13
|
+
* levels: ['error', 'warn'],
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
levels?: Array<LogSeverityLevel>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new Sentry Winston transport that fowards logs to Sentry. Requires `_experiments.enableLogs` to be enabled.
|
|
21
|
+
*
|
|
22
|
+
* Supports Winston 3.x.x.
|
|
23
|
+
*
|
|
24
|
+
* @param TransportClass - The Winston transport class to extend.
|
|
25
|
+
* @returns The extended transport class.
|
|
26
|
+
*
|
|
27
|
+
* @experimental This method will experience breaking changes. This is not yet part of
|
|
28
|
+
* the stable Sentry SDK API and can be changed or removed without warning.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const winston = require('winston');
|
|
33
|
+
* const Transport = require('winston-transport');
|
|
34
|
+
*
|
|
35
|
+
* const transport = Sentry.createSentryWinstonTransport(Transport);
|
|
36
|
+
*
|
|
37
|
+
* const logger = winston.createLogger({
|
|
38
|
+
* transports: [transport],
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function createSentryWinstonTransport<TransportStreamInstance extends object>(TransportClass: new (options?: any) => TransportStreamInstance, sentryWinstonOptions?: WinstonTransportOptions): typeof TransportClass;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=winston.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"winston.d.ts","sourceRoot":"","sources":["../../../src/integrations/winston.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAUrD;;GAEG;AACH,UAAU,uBAAuB;IAC/B;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,4BAA4B,CAAC,uBAAuB,SAAS,MAAM,EAEjF,cAAc,EAAE,KAAK,OAAO,CAAC,EAAE,GAAG,KAAK,uBAAuB,EAC9D,oBAAoB,CAAC,EAAE,uBAAuB,GAC7C,OAAO,cAAc,CAoDvB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LogSeverityLevel, Log, ParameterizedString } from '@sentry/core';
|
|
2
|
+
export type CaptureLogArgs = [message: ParameterizedString, attributes?: Log['attributes']] | [messageTemplate: string, messageParams: Array<unknown>, attributes?: Log['attributes']];
|
|
3
|
+
/**
|
|
4
|
+
* Capture a log with the given level.
|
|
5
|
+
*
|
|
6
|
+
* @param level - The level of the log.
|
|
7
|
+
* @param message - The message to log.
|
|
8
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
|
|
9
|
+
*/
|
|
10
|
+
export declare function captureLog(level: LogSeverityLevel, ...args: CaptureLogArgs): void;
|
|
11
|
+
//# sourceMappingURL=capture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../src/logs/capture.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAG/E,MAAM,MAAM,cAAc,GACtB,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,GAC9D,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;AAE7F;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,cAAc,GAAG,IAAI,CAajF"}
|
|
@@ -1,158 +1,150 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* }
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* }
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* }
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* }
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* }
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* }
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
|
1
|
+
import { type CaptureLogArgs } from './capture';
|
|
2
|
+
/**
|
|
3
|
+
* @summary Capture a log with the `trace` level. Requires `_experiments.enableLogs` to be enabled.
|
|
4
|
+
*
|
|
5
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* Sentry.logger.trace('Starting database connection', {
|
|
11
|
+
* database: 'users',
|
|
12
|
+
* connectionId: 'conn_123'
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @example With template strings
|
|
17
|
+
*
|
|
18
|
+
* ```
|
|
19
|
+
* Sentry.logger.trace('Database connection %s established for %s',
|
|
20
|
+
* ['successful', 'users'],
|
|
21
|
+
* { connectionId: 'conn_123' }
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function trace(...args: CaptureLogArgs): void;
|
|
26
|
+
/**
|
|
27
|
+
* @summary Capture a log with the `debug` level. Requires `_experiments.enableLogs` to be enabled.
|
|
28
|
+
*
|
|
29
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
*
|
|
33
|
+
* ```
|
|
34
|
+
* Sentry.logger.debug('Cache miss for user profile', {
|
|
35
|
+
* userId: 'user_123',
|
|
36
|
+
* cacheKey: 'profile:user_123'
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @example With template strings
|
|
41
|
+
*
|
|
42
|
+
* ```
|
|
43
|
+
* Sentry.logger.debug('Cache %s for %s: %s',
|
|
44
|
+
* ['miss', 'user profile', 'key not found'],
|
|
45
|
+
* { userId: 'user_123' }
|
|
46
|
+
* );
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function debug(...args: CaptureLogArgs): void;
|
|
50
|
+
/**
|
|
51
|
+
* @summary Capture a log with the `info` level. Requires `_experiments.enableLogs` to be enabled.
|
|
52
|
+
*
|
|
53
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
*
|
|
57
|
+
* ```
|
|
58
|
+
* Sentry.logger.info('User profile updated', {
|
|
59
|
+
* userId: 'user_123',
|
|
60
|
+
* updatedFields: ['email', 'preferences']
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @example With template strings
|
|
65
|
+
*
|
|
66
|
+
* ```
|
|
67
|
+
* Sentry.logger.info('User %s updated their %s',
|
|
68
|
+
* ['John Doe', 'profile settings'],
|
|
69
|
+
* { userId: 'user_123' }
|
|
70
|
+
* );
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare function info(...args: CaptureLogArgs): void;
|
|
74
|
+
/**
|
|
75
|
+
* @summary Capture a log with the `warn` level. Requires `_experiments.enableLogs` to be enabled.
|
|
76
|
+
*
|
|
77
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
*
|
|
81
|
+
* ```
|
|
82
|
+
* Sentry.logger.warn('Rate limit approaching', {
|
|
83
|
+
* endpoint: '/api/users',
|
|
84
|
+
* currentRate: '95/100',
|
|
85
|
+
* resetTime: '2024-03-20T10:00:00Z'
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @example With template strings
|
|
90
|
+
*
|
|
91
|
+
* ```
|
|
92
|
+
* Sentry.logger.warn('Rate limit %s for %s: %s',
|
|
93
|
+
* ['approaching', '/api/users', '95/100 requests'],
|
|
94
|
+
* { resetTime: '2024-03-20T10:00:00Z' }
|
|
95
|
+
* );
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
export declare function warn(...args: CaptureLogArgs): void;
|
|
99
|
+
/**
|
|
100
|
+
* @summary Capture a log with the `error` level. Requires `_experiments.enableLogs` to be enabled.
|
|
101
|
+
*
|
|
102
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
*
|
|
106
|
+
* ```
|
|
107
|
+
* Sentry.logger.error('Failed to process payment', {
|
|
108
|
+
* orderId: 'order_123',
|
|
109
|
+
* errorCode: 'PAYMENT_FAILED',
|
|
110
|
+
* amount: 99.99
|
|
111
|
+
* });
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @example With template strings
|
|
115
|
+
*
|
|
116
|
+
* ```
|
|
117
|
+
* Sentry.logger.error('Payment processing failed for order %s: %s',
|
|
118
|
+
* ['order_123', 'insufficient funds'],
|
|
119
|
+
* { amount: 99.99 }
|
|
120
|
+
* );
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
export declare function error(...args: CaptureLogArgs): void;
|
|
124
|
+
/**
|
|
125
|
+
* @summary Capture a log with the `fatal` level. Requires `_experiments.enableLogs` to be enabled.
|
|
126
|
+
*
|
|
127
|
+
* You can either pass a message and attributes or a message template, params and attributes.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
*
|
|
131
|
+
* ```
|
|
132
|
+
* Sentry.logger.fatal('Database connection pool exhausted', {
|
|
133
|
+
* database: 'users',
|
|
134
|
+
* activeConnections: 100,
|
|
135
|
+
* maxConnections: 100
|
|
136
|
+
* });
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* @example With template strings
|
|
140
|
+
*
|
|
141
|
+
* ```
|
|
142
|
+
* Sentry.logger.fatal('Database %s: %s connections active',
|
|
143
|
+
* ['connection pool exhausted', '100/100'],
|
|
144
|
+
* { database: 'users' }
|
|
145
|
+
* );
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
export declare function fatal(...args: CaptureLogArgs): void;
|
|
149
|
+
export { fmt } from '@sentry/core';
|
|
150
|
+
//# sourceMappingURL=exports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/logs/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CAAC,GAAG,IAAI,EAAE,cAAc,GAAG,IAAI,CAEnD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CAAC,GAAG,IAAI,EAAE,cAAc,GAAG,IAAI,CAEnD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,cAAc,GAAG,IAAI,CAElD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,cAAc,GAAG,IAAI,CAElD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,KAAK,CAAC,GAAG,IAAI,EAAE,cAAc,GAAG,IAAI,CAEnD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,KAAK,CAAC,GAAG,IAAI,EAAE,cAAc,GAAG,IAAI,CAEnD;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type Instrumentation } from '@opentelemetry/instrumentation';
|
|
2
2
|
/** Exported only for tests. */
|
|
3
3
|
export declare const INSTRUMENTED: Record<string, Instrumentation>;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
4
|
+
export declare function generateInstrumentOnce<Options, InstrumentationClass extends new (...args: any[]) => Instrumentation>(name: string, instrumentationClass: InstrumentationClass, optionsCallback: (options: Options) => ConstructorParameters<InstrumentationClass>[0]): ((options: Options) => InstanceType<InstrumentationClass>) & {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
8
7
|
export declare function generateInstrumentOnce<Options = unknown, InstrumentationInstance extends Instrumentation = Instrumentation>(name: string, creator: (options?: Options) => InstrumentationInstance): ((options?: Options) => InstrumentationInstance) & {
|
|
9
8
|
id: string;
|
|
10
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrument.d.ts","sourceRoot":"","sources":["../../../src/otel/instrument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAA4B,MAAM,gCAAgC,CAAC;AAEhG,+BAA+B;AAC/B,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAM,CAAC;AAEhE
|
|
1
|
+
{"version":3,"file":"instrument.d.ts","sourceRoot":"","sources":["../../../src/otel/instrument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAA4B,MAAM,gCAAgC,CAAC;AAEhG,+BAA+B;AAC/B,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAM,CAAC;AAEhE,wBAAgB,sBAAsB,CACpC,OAAO,EAEP,oBAAoB,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,eAAe,EAEpE,IAAI,EAAE,MAAM,EACZ,oBAAoB,EAAE,oBAAoB,EAC1C,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,qBAAqB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,GACpF,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,YAAY,CAAC,oBAAoB,CAAC,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAC/E,wBAAgB,sBAAsB,CACpC,OAAO,GAAG,OAAO,EACjB,uBAAuB,SAAS,eAAe,GAAG,eAAe,EAEjE,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,uBAAuB,GACtD,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,uBAAuB,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAqFrE;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,eAAe,EAAE,eAAe,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CA0BnH"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { httpIntegration } from './integrations/http';
|
|
2
2
|
export { nativeNodeFetchIntegration } from './integrations/node-fetch';
|
|
3
3
|
export { fsIntegration } from './integrations/fs';
|
|
4
|
-
export { consoleIntegration } from './integrations/console';
|
|
5
4
|
export { nodeContextIntegration } from './integrations/context';
|
|
6
5
|
export { contextLinesIntegration } from './integrations/contextlines';
|
|
7
6
|
export { localVariablesIntegration } from './integrations/local-variables';
|
|
@@ -32,6 +31,7 @@ export { dataloaderIntegration } from './integrations/tracing/dataloader';
|
|
|
32
31
|
export { amqplibIntegration } from './integrations/tracing/amqplib';
|
|
33
32
|
export { vercelAIIntegration } from './integrations/tracing/vercelai';
|
|
34
33
|
export { childProcessIntegration } from './integrations/childProcess';
|
|
34
|
+
export { createSentryWinstonTransport } from './integrations/winston';
|
|
35
35
|
export { SentryContextManager } from './otel/contextManager';
|
|
36
36
|
export { generateInstrumentOnce } from './otel/instrument';
|
|
37
37
|
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, validateOpenTelemetrySetup, } from './sdk';
|
|
@@ -44,8 +44,8 @@ export { NodeClient } from './sdk/client';
|
|
|
44
44
|
export { cron } from './cron';
|
|
45
45
|
export { NodeOptions } from './types';
|
|
46
46
|
export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
47
|
-
export { addBreadcrumb, isInitialized, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, zodErrorsIntegration, profiler, consoleLoggingIntegration, } from '@sentry/core';
|
|
47
|
+
export { addBreadcrumb, isInitialized, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, zodErrorsIntegration, profiler, consoleLoggingIntegration, consoleIntegration, } from '@sentry/core';
|
|
48
48
|
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/core';
|
|
49
|
-
import * as logger from './
|
|
49
|
+
import * as logger from './logs/exports';
|
|
50
50
|
export { logger };
|
|
51
51
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql';
|
|
1
2
|
interface GraphqlOptions {
|
|
2
3
|
/**
|
|
3
4
|
* Do not create spans for resolvers.
|
|
@@ -24,7 +25,7 @@ interface GraphqlOptions {
|
|
|
24
25
|
*/
|
|
25
26
|
useOperationNameForRootSpan?: boolean;
|
|
26
27
|
}
|
|
27
|
-
export declare const instrumentGraphql: ((options
|
|
28
|
+
export declare const instrumentGraphql: ((options: GraphqlOptions) => GraphQLInstrumentation) & {
|
|
28
29
|
id: string;
|
|
29
30
|
};
|
|
30
31
|
/**
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LogSeverityLevel } from '@sentry/core';
|
|
2
|
+
/**
|
|
3
|
+
* Options for the Sentry Winston transport.
|
|
4
|
+
*/
|
|
5
|
+
interface WinstonTransportOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Use this option to filter which levels should be captured. By default, all levels are captured.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const transport = Sentry.createSentryWinstonTransport(Transport, {
|
|
12
|
+
* // Only capture error and warn logs
|
|
13
|
+
* levels: ['error', 'warn'],
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
levels?: Array<LogSeverityLevel>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new Sentry Winston transport that fowards logs to Sentry. Requires `_experiments.enableLogs` to be enabled.
|
|
21
|
+
*
|
|
22
|
+
* Supports Winston 3.x.x.
|
|
23
|
+
*
|
|
24
|
+
* @param TransportClass - The Winston transport class to extend.
|
|
25
|
+
* @returns The extended transport class.
|
|
26
|
+
*
|
|
27
|
+
* @experimental This method will experience breaking changes. This is not yet part of
|
|
28
|
+
* the stable Sentry SDK API and can be changed or removed without warning.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const winston = require('winston');
|
|
33
|
+
* const Transport = require('winston-transport');
|
|
34
|
+
*
|
|
35
|
+
* const transport = Sentry.createSentryWinstonTransport(Transport);
|
|
36
|
+
*
|
|
37
|
+
* const logger = winston.createLogger({
|
|
38
|
+
* transports: [transport],
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function createSentryWinstonTransport<TransportStreamInstance extends object>(TransportClass: new (options?: any) => TransportStreamInstance, sentryWinstonOptions?: WinstonTransportOptions): typeof TransportClass;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=winston.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LogSeverityLevel, Log, ParameterizedString } from '@sentry/core';
|
|
2
|
+
export type CaptureLogArgs = [
|
|
3
|
+
/*message*/ ParameterizedString,
|
|
4
|
+
/*attributes*/ Log['attributes']
|
|
5
|
+
] | [
|
|
6
|
+
/*messageTemplate*/ string,
|
|
7
|
+
/*messageParams*/ Array<unknown>,
|
|
8
|
+
/*attributes*/ Log['attributes']
|
|
9
|
+
];
|
|
10
|
+
/**
|
|
11
|
+
* Capture a log with the given level.
|
|
12
|
+
*
|
|
13
|
+
* @param level - The level of the log.
|
|
14
|
+
* @param message - The message to log.
|
|
15
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
|
|
16
|
+
*/
|
|
17
|
+
export declare function captureLog(level: LogSeverityLevel, ...args: CaptureLogArgs): void;
|
|
18
|
+
//# sourceMappingURL=capture.d.ts.map
|