@sentry/node 10.60.0 → 10.62.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/fs/index.js +8 -17
- package/build/cjs/integrations/fs/index.js.map +1 -1
- package/build/cjs/integrations/fs/vendored/instrumentation.js +110 -161
- package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/node-fetch/vendored/undici.js +1 -2
- package/build/cjs/integrations/node-fetch/vendored/undici.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/index.js +2 -10
- package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +117 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +185 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +21 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js +0 -6
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +71 -80
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +5 -6
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/firebase.js +1 -24
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +3 -11
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +33 -72
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +46 -105
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/vendored/utils.js +2 -2
- package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +1 -2
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js +1 -2
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +1 -2
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +1 -2
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +2 -3
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js +1 -2
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/index.js +6 -2
- package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +2 -3
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +3 -4
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +1 -2
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +3 -0
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/integrations/fs/index.js +9 -18
- package/build/esm/integrations/fs/index.js.map +1 -1
- package/build/esm/integrations/fs/vendored/instrumentation.js +111 -162
- package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/node-fetch/vendored/undici.js +2 -3
- package/build/esm/integrations/node-fetch/vendored/undici.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/index.js +3 -11
- package/build/esm/integrations/tracing/amqplib/index.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +115 -0
- package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/patches.js +177 -0
- package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +12 -2
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/types.js +1 -6
- package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js +68 -78
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +6 -7
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/firebase.js +3 -26
- package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +3 -11
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +34 -73
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +47 -106
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/vendored/utils.js +4 -4
- package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +2 -3
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/mongo/vendored/utils.js +2 -3
- package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +2 -3
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +2 -3
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +3 -4
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/vendored/utils.js +2 -3
- package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/redis/index.js +6 -2
- package/build/esm/integrations/tracing/redis/index.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +3 -4
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +4 -5
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +2 -3
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js +3 -0
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/fs/index.d.ts +2 -14
- package/build/types/integrations/fs/index.d.ts.map +1 -1
- package/build/types/integrations/fs/vendored/instrumentation.d.ts +2 -10
- package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/fs/vendored/types.d.ts +1 -2
- package/build/types/integrations/fs/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/node-fetch/vendored/undici.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/index.d.ts +1 -1
- package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
- package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
- package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +25 -37
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +0 -81
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +16 -9
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -20
- package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/index.d.ts +0 -1
- package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +1 -1
- package/build/types-ts3.8/integrations/fs/index.d.ts +2 -14
- package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +2 -10
- package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +1 -2
- package/build/types-ts3.8/integrations/tracing/amqplib/index.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +25 -37
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +0 -81
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +16 -9
- package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
- package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
- package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +0 -1
- package/package.json +5 -5
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js +0 -452
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js +0 -24
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js +0 -450
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js +0 -13
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +0 -1
- package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts +0 -26
- package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +0 -63
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts.map +0 -1
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib.d.ts +0 -26
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +0 -63
|
@@ -1,37 +1,3 @@
|
|
|
1
|
-
import { Span } from '@opentelemetry/api';
|
|
2
|
-
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
3
|
-
export interface PublishInfo {
|
|
4
|
-
moduleVersion: string | undefined;
|
|
5
|
-
exchange: string;
|
|
6
|
-
routingKey: string;
|
|
7
|
-
content: Buffer;
|
|
8
|
-
options?: AmqplibPublishOptions;
|
|
9
|
-
isConfirmChannel?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface PublishConfirmedInfo extends PublishInfo {
|
|
12
|
-
confirmError?: any;
|
|
13
|
-
}
|
|
14
|
-
export interface ConsumeInfo {
|
|
15
|
-
moduleVersion: string | undefined;
|
|
16
|
-
msg: ConsumeMessage;
|
|
17
|
-
}
|
|
18
|
-
export interface ConsumeEndInfo {
|
|
19
|
-
msg: ConsumeMessage;
|
|
20
|
-
rejected: boolean | null;
|
|
21
|
-
endOperation: EndOperation;
|
|
22
|
-
}
|
|
23
|
-
export interface AmqplibPublishCustomAttributeFunction {
|
|
24
|
-
(span: Span, publishInfo: PublishInfo): void;
|
|
25
|
-
}
|
|
26
|
-
export interface AmqplibPublishConfirmCustomAttributeFunction {
|
|
27
|
-
(span: Span, publishConfirmedInto: PublishConfirmedInfo): void;
|
|
28
|
-
}
|
|
29
|
-
export interface AmqplibConsumeCustomAttributeFunction {
|
|
30
|
-
(span: Span, consumeInfo: ConsumeInfo): void;
|
|
31
|
-
}
|
|
32
|
-
export interface AmqplibConsumeEndCustomAttributeFunction {
|
|
33
|
-
(span: Span, consumeEndInfo: ConsumeEndInfo): void;
|
|
34
|
-
}
|
|
35
1
|
export declare enum EndOperation {
|
|
36
2
|
AutoAck = "auto ack",
|
|
37
3
|
Ack = "ack",
|
|
@@ -43,53 +9,6 @@ export declare enum EndOperation {
|
|
|
43
9
|
ChannelError = "channel error",
|
|
44
10
|
InstrumentationTimeout = "instrumentation timeout"
|
|
45
11
|
}
|
|
46
|
-
export interface AmqplibInstrumentationConfig extends InstrumentationConfig {
|
|
47
|
-
/** hook for adding custom attributes before publish message is sent */
|
|
48
|
-
publishHook?: AmqplibPublishCustomAttributeFunction;
|
|
49
|
-
/** hook for adding custom attributes after publish message is confirmed by the broker */
|
|
50
|
-
publishConfirmHook?: AmqplibPublishConfirmCustomAttributeFunction;
|
|
51
|
-
/** hook for adding custom attributes before consumer message is processed */
|
|
52
|
-
consumeHook?: AmqplibConsumeCustomAttributeFunction;
|
|
53
|
-
/** hook for adding custom attributes after consumer message is acked to server */
|
|
54
|
-
consumeEndHook?: AmqplibConsumeEndCustomAttributeFunction;
|
|
55
|
-
/**
|
|
56
|
-
* When user is setting up consume callback, it is user's responsibility to call
|
|
57
|
-
* ack/nack etc on the msg to resolve it in the server.
|
|
58
|
-
* If user is not calling the ack, the message will stay in the queue until
|
|
59
|
-
* channel is closed, or until server timeout expires (if configured).
|
|
60
|
-
* While we wait for the ack, a reference to the message is stored in plugin, which
|
|
61
|
-
* will never be garbage collected.
|
|
62
|
-
* To prevent memory leak, plugin has it's own configuration of timeout, which
|
|
63
|
-
* will close the span if user did not call ack after this timeout.
|
|
64
|
-
* If timeout is not big enough, span might be closed with 'InstrumentationTimeout',
|
|
65
|
-
* and then received valid ack from the user later which will not be instrumented.
|
|
66
|
-
*
|
|
67
|
-
* Default is 1 minute
|
|
68
|
-
*/
|
|
69
|
-
consumeTimeoutMs?: number;
|
|
70
|
-
/** option to use a span link for the consume message instead of continuing a trace */
|
|
71
|
-
useLinksForConsume?: boolean;
|
|
72
|
-
}
|
|
73
|
-
export declare const DEFAULT_CONFIG: AmqplibInstrumentationConfig;
|
|
74
|
-
export interface AmqplibPublishOptions {
|
|
75
|
-
expiration?: string | number;
|
|
76
|
-
userId?: string;
|
|
77
|
-
CC?: string | string[];
|
|
78
|
-
mandatory?: boolean;
|
|
79
|
-
persistent?: boolean;
|
|
80
|
-
deliveryMode?: boolean | number;
|
|
81
|
-
BCC?: string | string[];
|
|
82
|
-
contentType?: string;
|
|
83
|
-
contentEncoding?: string;
|
|
84
|
-
headers?: any;
|
|
85
|
-
priority?: number;
|
|
86
|
-
correlationId?: string;
|
|
87
|
-
replyTo?: string;
|
|
88
|
-
messageId?: string;
|
|
89
|
-
timestamp?: number;
|
|
90
|
-
type?: string;
|
|
91
|
-
appId?: string;
|
|
92
|
-
}
|
|
93
12
|
export interface Message {
|
|
94
13
|
content: Buffer;
|
|
95
14
|
fields: MessageFields;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Connection, Channel, ConfirmChannel, Options } from './amqplib-types';
|
|
1
|
+
import { Span, SpanAttributes } from '@sentry/core';
|
|
2
|
+
import { Channel, ConfirmChannel, Connection, Options } from './amqplib-types';
|
|
4
3
|
import { ConsumeMessage, Message } from './types';
|
|
5
4
|
export declare const MESSAGE_STORED_SPAN: unique symbol;
|
|
6
5
|
export declare const CHANNEL_SPANS_NOT_ENDED: unique symbol;
|
|
7
6
|
export declare const CHANNEL_CONSUME_TIMEOUT_TIMER: unique symbol;
|
|
8
7
|
export declare const CONNECTION_ATTRIBUTES: unique symbol;
|
|
8
|
+
export declare const CHANNEL_IS_CONFIRM_PUBLISHING: unique symbol;
|
|
9
9
|
export type InstrumentationConnection = Connection & {
|
|
10
|
-
[CONNECTION_ATTRIBUTES]?:
|
|
10
|
+
[CONNECTION_ATTRIBUTES]?: SpanAttributes;
|
|
11
11
|
};
|
|
12
12
|
export type InstrumentationPublishChannel = (Channel | ConfirmChannel) & {
|
|
13
13
|
connection: InstrumentationConnection;
|
|
14
|
+
[CHANNEL_IS_CONFIRM_PUBLISHING]?: boolean;
|
|
14
15
|
};
|
|
15
16
|
export type InstrumentationConsumeChannel = Channel & {
|
|
16
17
|
connection: InstrumentationConnection;
|
|
@@ -27,9 +28,15 @@ export type InstrumentationConsumeMessage = ConsumeMessage & {
|
|
|
27
28
|
[MESSAGE_STORED_SPAN]?: Span;
|
|
28
29
|
};
|
|
29
30
|
export declare const normalizeExchange: (exchangeName: string) => string;
|
|
30
|
-
export declare const getConnectionAttributesFromServer: (conn: Connection) =>
|
|
31
|
-
export declare const getConnectionAttributesFromUrl: (url: string | Options.Connect
|
|
32
|
-
|
|
33
|
-
export declare
|
|
34
|
-
|
|
31
|
+
export declare const getConnectionAttributesFromServer: (conn: Connection) => SpanAttributes;
|
|
32
|
+
export declare const getConnectionAttributesFromUrl: (url: string | Options.Connect) => SpanAttributes;
|
|
33
|
+
/** Reads a propagation header value off an amqplib message as a string. */
|
|
34
|
+
export declare function getHeaderAsString(headers: Record<string, unknown> | undefined, key: string): string | undefined;
|
|
35
|
+
/** Starts an inactive producer span and propagates its trace into the publish `options.headers`. */
|
|
36
|
+
export declare function startPublishSpan(exchange: string, routingKey: string, channel: InstrumentationPublishChannel, options?: Options.Publish): {
|
|
37
|
+
span: Span;
|
|
38
|
+
modifiedOptions: Options.Publish;
|
|
39
|
+
};
|
|
40
|
+
/** Starts an inactive consumer (process) span carrying the amqplib messaging attributes. */
|
|
41
|
+
export declare function startConsumeSpan(queue: string, msg: InstrumentationConsumeMessage, channel: InstrumentationConsumeChannel): Span;
|
|
35
42
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { InstrumentationConfig, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
3
3
|
/**
|
|
4
4
|
* Instrumentation for Firebase services, specifically Firestore.
|
|
5
5
|
*/
|
|
6
|
-
export declare class FirebaseInstrumentation extends InstrumentationBase<
|
|
7
|
-
constructor(config?:
|
|
8
|
-
/**
|
|
9
|
-
* sets config
|
|
10
|
-
* @param config
|
|
11
|
-
*/
|
|
12
|
-
setConfig(config?: FirebaseInstrumentationConfig): void;
|
|
6
|
+
export declare class FirebaseInstrumentation extends InstrumentationBase<InstrumentationConfig> {
|
|
7
|
+
constructor(config?: InstrumentationConfig);
|
|
13
8
|
/**
|
|
14
9
|
*
|
|
15
10
|
* @protected
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import { Tracer } from '@opentelemetry/api';
|
|
2
1
|
import { InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
3
|
-
import {
|
|
2
|
+
import { FirestoreSettings } from '../types';
|
|
4
3
|
type ShimmerWrap = (target: any, name: string, wrapper: (...args: any[]) => any) => void;
|
|
5
4
|
type ShimmerUnwrap = (target: any, name: string) => void;
|
|
6
5
|
/**
|
|
7
6
|
*
|
|
8
|
-
* @param tracer - Opentelemetry Tracer
|
|
9
7
|
* @param firestoreSupportedVersions - supported version of firebase/firestore
|
|
10
8
|
* @param wrap - reference to native instrumentation wrap function
|
|
11
9
|
* @param unwrap - reference to native instrumentation wrap function
|
|
12
10
|
*/
|
|
13
|
-
export declare function patchFirestore(
|
|
11
|
+
export declare function patchFirestore(firestoreSupportedVersions: string[], wrap: ShimmerWrap, unwrap: ShimmerUnwrap): InstrumentationNodeModuleDefinition;
|
|
14
12
|
/**
|
|
15
13
|
* Gets the server address and port attributes from the Firestore settings.
|
|
16
14
|
* It's best effort to extract the address and port from the settings, especially for IPv6.
|
|
17
|
-
* @param span - The span to set attributes on.
|
|
18
15
|
* @param settings - The Firestore settings containing host information.
|
|
19
16
|
*/
|
|
20
17
|
export declare function getPortAndAddress(settings: FirestoreSettings): {
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import { Tracer } from '@opentelemetry/api';
|
|
2
1
|
import { InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
3
2
|
import { InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
4
|
-
import { FirebaseFunctions,
|
|
3
|
+
import { FirebaseFunctions, OverloadedParameters } from '../types';
|
|
5
4
|
/**
|
|
6
5
|
* Patches Firebase Functions v2 to add OpenTelemetry instrumentation
|
|
7
|
-
* @param tracer - Opentelemetry Tracer
|
|
8
6
|
* @param functionsSupportedVersions - supported versions of firebase-functions
|
|
9
7
|
* @param wrap - reference to native instrumentation wrap function
|
|
10
8
|
* @param unwrap - reference to native instrumentation unwrap function
|
|
11
|
-
* @param config - Firebase instrumentation config
|
|
12
9
|
*/
|
|
13
|
-
export declare function patchFunctions(
|
|
10
|
+
export declare function patchFunctions(functionsSupportedVersions: string[], wrap: InstrumentationBase['_wrap'], unwrap: InstrumentationBase['_unwrap']): InstrumentationNodeModuleDefinition;
|
|
14
11
|
/**
|
|
15
12
|
* Patches Cloud Functions for Firebase (v2) to add OpenTelemetry instrumentation
|
|
16
13
|
*
|
|
17
|
-
* @param tracer - Opentelemetry Tracer
|
|
18
|
-
* @param functionsConfig - Firebase instrumentation config
|
|
19
14
|
* @param triggerType - Type of trigger
|
|
20
15
|
* @returns A function that patches the function
|
|
21
16
|
*/
|
|
22
|
-
export declare function patchV2Functions<T extends FirebaseFunctions = FirebaseFunctions>(
|
|
17
|
+
export declare function patchV2Functions<T extends FirebaseFunctions = FirebaseFunctions>(triggerType: string): (original: T) => (...args: OverloadedParameters<T>) => ReturnType<T>;
|
|
23
18
|
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Span } from '@opentelemetry/api';
|
|
2
|
-
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
3
1
|
export interface FirebaseOptions {
|
|
4
2
|
[key: string]: any;
|
|
5
3
|
apiKey?: string;
|
|
@@ -70,24 +68,6 @@ export interface FirestoreSettings {
|
|
|
70
68
|
experimentalAutoDetectLongPolling?: boolean;
|
|
71
69
|
useFetchStreams?: boolean;
|
|
72
70
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Firebase Auto Instrumentation
|
|
75
|
-
*/
|
|
76
|
-
export interface FirebaseInstrumentationConfig extends InstrumentationConfig {
|
|
77
|
-
firestoreSpanCreationHook?: FirestoreSpanCreationHook;
|
|
78
|
-
functions?: FunctionsConfig;
|
|
79
|
-
}
|
|
80
|
-
export interface FunctionsConfig {
|
|
81
|
-
requestHook?: RequestHook;
|
|
82
|
-
responseHook?: ResponseHook;
|
|
83
|
-
errorHook?: ErrorHook;
|
|
84
|
-
}
|
|
85
|
-
export type RequestHook = (span: Span) => void;
|
|
86
|
-
export type ResponseHook = (span: Span, error?: unknown) => void;
|
|
87
|
-
export type ErrorHook = (span: Span, error?: unknown) => Promise<void> | void;
|
|
88
|
-
export interface FirestoreSpanCreationHook {
|
|
89
|
-
(span: Span): void;
|
|
90
|
-
}
|
|
91
71
|
export type GetDocsType<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> = (query: CollectionReference<AppModelType, DbModelType>) => Promise<QuerySnapshot<AppModelType, DbModelType>>;
|
|
92
72
|
export type SetDocType<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> = ((reference: DocumentReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>) => Promise<void>) & ((reference: DocumentReference<AppModelType, DbModelType>, data: PartialWithFieldValue<AppModelType>, options: SetOptions) => Promise<void>);
|
|
93
73
|
export type AddDocType<AppModelType, DbModelType extends DocumentData> = (reference: CollectionReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>) => Promise<DocumentReference<AppModelType, DbModelType>>;
|
|
@@ -5,7 +5,6 @@ export declare const instrumentVercelAi: ((options?: unknown) => SentryVercelAiI
|
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
* Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.
|
|
8
|
-
* This integration is not enabled by default, you need to manually add it.
|
|
9
8
|
*
|
|
10
9
|
* For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
|
|
11
10
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.62.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",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"@opentelemetry/instrumentation": "^0.214.0",
|
|
70
70
|
"@opentelemetry/sdk-trace-base": "^2.6.1",
|
|
71
71
|
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
72
|
-
"@sentry/core": "10.
|
|
73
|
-
"@sentry/node-core": "10.
|
|
74
|
-
"@sentry/opentelemetry": "10.
|
|
75
|
-
"@sentry/server-utils": "10.
|
|
72
|
+
"@sentry/core": "10.62.0",
|
|
73
|
+
"@sentry/node-core": "10.62.0",
|
|
74
|
+
"@sentry/opentelemetry": "10.62.0",
|
|
75
|
+
"@sentry/server-utils": "10.62.0",
|
|
76
76
|
"import-in-the-middle": "^3.0.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|