@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.
Files changed (182) hide show
  1. package/build/cjs/index.js +2 -0
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/integrations/fs/index.js +8 -17
  4. package/build/cjs/integrations/fs/index.js.map +1 -1
  5. package/build/cjs/integrations/fs/vendored/instrumentation.js +110 -161
  6. package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -1
  7. package/build/cjs/integrations/node-fetch/vendored/undici.js +1 -2
  8. package/build/cjs/integrations/node-fetch/vendored/undici.js.map +1 -1
  9. package/build/cjs/integrations/tracing/amqplib/index.js +2 -10
  10. package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -1
  11. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +117 -0
  12. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  13. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +185 -0
  14. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  15. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +21 -1
  16. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
  17. package/build/cjs/integrations/tracing/amqplib/vendored/types.js +0 -6
  18. package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -1
  19. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +71 -80
  20. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
  21. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +5 -6
  22. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -1
  23. package/build/cjs/integrations/tracing/firebase/firebase.js +1 -24
  24. package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
  25. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +3 -11
  26. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  27. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +33 -72
  28. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  29. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +46 -105
  30. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  31. package/build/cjs/integrations/tracing/kafka/vendored/utils.js +2 -2
  32. package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -1
  33. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +1 -2
  34. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -1
  35. package/build/cjs/integrations/tracing/mongo/vendored/utils.js +1 -2
  36. package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -1
  37. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +1 -2
  38. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
  39. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +1 -2
  40. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -1
  41. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +2 -3
  42. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -1
  43. package/build/cjs/integrations/tracing/postgres/vendored/utils.js +1 -2
  44. package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -1
  45. package/build/cjs/integrations/tracing/redis/index.js +6 -2
  46. package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
  47. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +2 -3
  48. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
  49. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +3 -4
  50. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
  51. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +1 -2
  52. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -1
  53. package/build/cjs/integrations/tracing/vercelai/index.js +3 -0
  54. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  55. package/build/esm/index.js +1 -1
  56. package/build/esm/integrations/fs/index.js +9 -18
  57. package/build/esm/integrations/fs/index.js.map +1 -1
  58. package/build/esm/integrations/fs/vendored/instrumentation.js +111 -162
  59. package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -1
  60. package/build/esm/integrations/node-fetch/vendored/undici.js +2 -3
  61. package/build/esm/integrations/node-fetch/vendored/undici.js.map +1 -1
  62. package/build/esm/integrations/tracing/amqplib/index.js +3 -11
  63. package/build/esm/integrations/tracing/amqplib/index.js.map +1 -1
  64. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +115 -0
  65. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  66. package/build/esm/integrations/tracing/amqplib/vendored/patches.js +177 -0
  67. package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  68. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +12 -2
  69. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
  70. package/build/esm/integrations/tracing/amqplib/vendored/types.js +1 -6
  71. package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -1
  72. package/build/esm/integrations/tracing/amqplib/vendored/utils.js +68 -78
  73. package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
  74. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +6 -7
  75. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -1
  76. package/build/esm/integrations/tracing/firebase/firebase.js +3 -26
  77. package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
  78. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +3 -11
  79. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  80. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +34 -73
  81. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  82. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +47 -106
  83. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  84. package/build/esm/integrations/tracing/kafka/vendored/utils.js +4 -4
  85. package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -1
  86. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +2 -3
  87. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -1
  88. package/build/esm/integrations/tracing/mongo/vendored/utils.js +2 -3
  89. package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -1
  90. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +2 -3
  91. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
  92. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +2 -3
  93. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -1
  94. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +3 -4
  95. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -1
  96. package/build/esm/integrations/tracing/postgres/vendored/utils.js +2 -3
  97. package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -1
  98. package/build/esm/integrations/tracing/redis/index.js +6 -2
  99. package/build/esm/integrations/tracing/redis/index.js.map +1 -1
  100. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +3 -4
  101. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
  102. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +4 -5
  103. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
  104. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +2 -3
  105. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -1
  106. package/build/esm/integrations/tracing/vercelai/index.js +3 -0
  107. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  108. package/build/esm/package.json +1 -1
  109. package/build/types/index.d.ts +1 -1
  110. package/build/types/index.d.ts.map +1 -1
  111. package/build/types/integrations/fs/index.d.ts +2 -14
  112. package/build/types/integrations/fs/index.d.ts.map +1 -1
  113. package/build/types/integrations/fs/vendored/instrumentation.d.ts +2 -10
  114. package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -1
  115. package/build/types/integrations/fs/vendored/types.d.ts +1 -2
  116. package/build/types/integrations/fs/vendored/types.d.ts.map +1 -1
  117. package/build/types/integrations/node-fetch/vendored/undici.d.ts.map +1 -1
  118. package/build/types/integrations/tracing/amqplib/index.d.ts +1 -1
  119. package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -1
  120. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  121. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +1 -0
  122. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  123. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +1 -0
  124. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +25 -37
  125. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -1
  126. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +0 -81
  127. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -1
  128. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +16 -9
  129. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -1
  130. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -1
  131. package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
  132. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  133. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -1
  134. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  135. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
  136. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  137. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -1
  138. package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -20
  139. package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -1
  140. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +1 -1
  141. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -1
  142. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -1
  143. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -1
  144. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -1
  145. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -1
  146. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -1
  147. package/build/types/integrations/tracing/redis/index.d.ts.map +1 -1
  148. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -1
  149. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -1
  150. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -1
  151. package/build/types/integrations/tracing/vercelai/index.d.ts +0 -1
  152. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  153. package/build/types-ts3.8/index.d.ts +1 -1
  154. package/build/types-ts3.8/integrations/fs/index.d.ts +2 -14
  155. package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +2 -10
  156. package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +1 -2
  157. package/build/types-ts3.8/integrations/tracing/amqplib/index.d.ts +1 -1
  158. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  159. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  160. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +25 -37
  161. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +0 -81
  162. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +16 -9
  163. package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  164. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  165. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  166. package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
  167. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +0 -1
  168. package/package.json +5 -5
  169. package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js +0 -452
  170. package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js.map +0 -1
  171. package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js +0 -24
  172. package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +0 -1
  173. package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js +0 -450
  174. package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js.map +0 -1
  175. package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js +0 -13
  176. package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +0 -1
  177. package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts +0 -26
  178. package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts.map +0 -1
  179. package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +0 -63
  180. package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts.map +0 -1
  181. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib.d.ts +0 -26
  182. 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 { Context, Span, Attributes } from '@opentelemetry/api';
2
- import { SemconvStability } from '@opentelemetry/instrumentation';
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]?: 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) => Attributes;
31
- export declare const getConnectionAttributesFromUrl: (url: string | Options.Connect, netSemconvStability: SemconvStability) => Attributes;
32
- export declare const markConfirmChannelTracing: (context: Context) => Context;
33
- export declare const unmarkConfirmChannelTracing: (context: Context) => Context;
34
- export declare const isConfirmChannelTracing: (context: Context) => boolean;
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 { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
2
- import { FirebaseInstrumentationConfig } from './types';
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<FirebaseInstrumentationConfig> {
7
- constructor(config?: FirebaseInstrumentationConfig);
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 { FirebaseInstrumentationConfig, FirestoreSettings } from '../types';
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(tracer: Tracer, firestoreSupportedVersions: string[], wrap: ShimmerWrap, unwrap: ShimmerUnwrap, config: FirebaseInstrumentationConfig): InstrumentationNodeModuleDefinition;
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, FirebaseInstrumentationConfig, OverloadedParameters } from '../types';
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(tracer: Tracer, functionsSupportedVersions: string[], wrap: InstrumentationBase['_wrap'], unwrap: InstrumentationBase['_unwrap'], config: FirebaseInstrumentationConfig): InstrumentationNodeModuleDefinition;
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>(tracer: Tracer, functionsConfig: FirebaseInstrumentationConfig['functions'], triggerType: string): (original: T) => (...args: OverloadedParameters<T>) => ReturnType<T>;
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.60.0",
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.60.0",
73
- "@sentry/node-core": "10.60.0",
74
- "@sentry/opentelemetry": "10.60.0",
75
- "@sentry/server-utils": "10.60.0",
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": {