@sentry/core 10.48.0 → 10.50.0-alpha.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 (220) hide show
  1. package/build/cjs/client.js +9 -0
  2. package/build/cjs/client.js.map +1 -1
  3. package/build/cjs/fetch.js +41 -19
  4. package/build/cjs/fetch.js.map +1 -1
  5. package/build/cjs/index.js +9 -5
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/integration.js +9 -0
  8. package/build/cjs/integration.js.map +1 -1
  9. package/build/cjs/integrations/conversationId.js +11 -0
  10. package/build/cjs/integrations/conversationId.js.map +1 -1
  11. package/build/cjs/integrations/express/index.js +44 -7
  12. package/build/cjs/integrations/express/index.js.map +1 -1
  13. package/build/cjs/integrations/express/patch-layer.js +7 -1
  14. package/build/cjs/integrations/express/patch-layer.js.map +1 -1
  15. package/build/cjs/integrations/express/types.js.map +1 -1
  16. package/build/cjs/integrations/mcp-server/transport.js +9 -9
  17. package/build/cjs/integrations/mcp-server/transport.js.map +1 -1
  18. package/build/cjs/tracing/ai/gen-ai-attributes.js +0 -30
  19. package/build/cjs/tracing/ai/gen-ai-attributes.js.map +1 -1
  20. package/build/cjs/tracing/ai/utils.js +24 -0
  21. package/build/cjs/tracing/ai/utils.js.map +1 -1
  22. package/build/cjs/tracing/anthropic-ai/index.js +5 -5
  23. package/build/cjs/tracing/anthropic-ai/index.js.map +1 -1
  24. package/build/cjs/tracing/anthropic-ai/utils.js +4 -2
  25. package/build/cjs/tracing/anthropic-ai/utils.js.map +1 -1
  26. package/build/cjs/tracing/google-genai/index.js +16 -5
  27. package/build/cjs/tracing/google-genai/index.js.map +1 -1
  28. package/build/cjs/tracing/langchain/index.js +3 -0
  29. package/build/cjs/tracing/langchain/index.js.map +1 -1
  30. package/build/cjs/tracing/langchain/utils.js +12 -4
  31. package/build/cjs/tracing/langchain/utils.js.map +1 -1
  32. package/build/cjs/tracing/langgraph/index.js +4 -3
  33. package/build/cjs/tracing/langgraph/index.js.map +1 -1
  34. package/build/cjs/tracing/openai/index.js +12 -5
  35. package/build/cjs/tracing/openai/index.js.map +1 -1
  36. package/build/cjs/tracing/sentrySpan.js +5 -0
  37. package/build/cjs/tracing/sentrySpan.js.map +1 -1
  38. package/build/cjs/tracing/spans/captureSpan.js +3 -1
  39. package/build/cjs/tracing/spans/captureSpan.js.map +1 -1
  40. package/build/cjs/tracing/spans/extractGenAiSpans.js +50 -0
  41. package/build/cjs/tracing/spans/extractGenAiSpans.js.map +1 -0
  42. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js +26 -0
  43. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js.map +1 -0
  44. package/build/cjs/tracing/trace.js +17 -6
  45. package/build/cjs/tracing/trace.js.map +1 -1
  46. package/build/cjs/tracing/utils.js +3 -37
  47. package/build/cjs/tracing/utils.js.map +1 -1
  48. package/build/cjs/tracing/vercel-ai/constants.js +15 -23
  49. package/build/cjs/tracing/vercel-ai/constants.js.map +1 -1
  50. package/build/cjs/tracing/vercel-ai/index.js +41 -45
  51. package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
  52. package/build/cjs/tracing/vercel-ai/utils.js +11 -39
  53. package/build/cjs/tracing/vercel-ai/utils.js.map +1 -1
  54. package/build/cjs/tracing/vercel-ai/vercel-ai-attributes.js +4 -1
  55. package/build/cjs/tracing/vercel-ai/vercel-ai-attributes.js.map +1 -1
  56. package/build/cjs/utils/browser.js +2 -3
  57. package/build/cjs/utils/browser.js.map +1 -1
  58. package/build/cjs/utils/version.js +1 -1
  59. package/build/cjs/utils/version.js.map +1 -1
  60. package/build/cjs/utils/weakRef.js +62 -0
  61. package/build/cjs/utils/weakRef.js.map +1 -0
  62. package/build/esm/client.js +9 -0
  63. package/build/esm/client.js.map +1 -1
  64. package/build/esm/fetch.js +41 -19
  65. package/build/esm/fetch.js.map +1 -1
  66. package/build/esm/index.js +2 -1
  67. package/build/esm/index.js.map +1 -1
  68. package/build/esm/integration.js +9 -0
  69. package/build/esm/integration.js.map +1 -1
  70. package/build/esm/integrations/conversationId.js +11 -0
  71. package/build/esm/integrations/conversationId.js.map +1 -1
  72. package/build/esm/integrations/express/index.js +44 -7
  73. package/build/esm/integrations/express/index.js.map +1 -1
  74. package/build/esm/integrations/express/patch-layer.js +7 -1
  75. package/build/esm/integrations/express/patch-layer.js.map +1 -1
  76. package/build/esm/integrations/express/types.js.map +1 -1
  77. package/build/esm/integrations/mcp-server/transport.js +9 -9
  78. package/build/esm/integrations/mcp-server/transport.js.map +1 -1
  79. package/build/esm/package.json +1 -1
  80. package/build/esm/tracing/ai/gen-ai-attributes.js +1 -26
  81. package/build/esm/tracing/ai/gen-ai-attributes.js.map +1 -1
  82. package/build/esm/tracing/ai/utils.js +23 -1
  83. package/build/esm/tracing/ai/utils.js.map +1 -1
  84. package/build/esm/tracing/anthropic-ai/index.js +6 -6
  85. package/build/esm/tracing/anthropic-ai/index.js.map +1 -1
  86. package/build/esm/tracing/anthropic-ai/utils.js +5 -3
  87. package/build/esm/tracing/anthropic-ai/utils.js.map +1 -1
  88. package/build/esm/tracing/google-genai/index.js +17 -6
  89. package/build/esm/tracing/google-genai/index.js.map +1 -1
  90. package/build/esm/tracing/langchain/index.js +4 -1
  91. package/build/esm/tracing/langchain/index.js.map +1 -1
  92. package/build/esm/tracing/langchain/utils.js +13 -5
  93. package/build/esm/tracing/langchain/utils.js.map +1 -1
  94. package/build/esm/tracing/langgraph/index.js +5 -4
  95. package/build/esm/tracing/langgraph/index.js.map +1 -1
  96. package/build/esm/tracing/openai/index.js +13 -6
  97. package/build/esm/tracing/openai/index.js.map +1 -1
  98. package/build/esm/tracing/sentrySpan.js +5 -0
  99. package/build/esm/tracing/sentrySpan.js.map +1 -1
  100. package/build/esm/tracing/spans/captureSpan.js +3 -1
  101. package/build/esm/tracing/spans/captureSpan.js.map +1 -1
  102. package/build/esm/tracing/spans/extractGenAiSpans.js +48 -0
  103. package/build/esm/tracing/spans/extractGenAiSpans.js.map +1 -0
  104. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js +24 -0
  105. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js.map +1 -0
  106. package/build/esm/tracing/trace.js +17 -6
  107. package/build/esm/tracing/trace.js.map +1 -1
  108. package/build/esm/tracing/utils.js +3 -37
  109. package/build/esm/tracing/utils.js.map +1 -1
  110. package/build/esm/tracing/vercel-ai/constants.js +15 -19
  111. package/build/esm/tracing/vercel-ai/constants.js.map +1 -1
  112. package/build/esm/tracing/vercel-ai/index.js +38 -42
  113. package/build/esm/tracing/vercel-ai/index.js.map +1 -1
  114. package/build/esm/tracing/vercel-ai/utils.js +14 -41
  115. package/build/esm/tracing/vercel-ai/utils.js.map +1 -1
  116. package/build/esm/tracing/vercel-ai/vercel-ai-attributes.js +4 -1
  117. package/build/esm/tracing/vercel-ai/vercel-ai-attributes.js.map +1 -1
  118. package/build/esm/utils/browser.js +2 -3
  119. package/build/esm/utils/browser.js.map +1 -1
  120. package/build/esm/utils/version.js +1 -1
  121. package/build/esm/utils/version.js.map +1 -1
  122. package/build/esm/utils/weakRef.js +59 -0
  123. package/build/esm/utils/weakRef.js.map +1 -0
  124. package/build/types/build-time-plugins/buildTimeOptionsBase.d.ts +13 -0
  125. package/build/types/build-time-plugins/buildTimeOptionsBase.d.ts.map +1 -1
  126. package/build/types/client.d.ts +20 -0
  127. package/build/types/client.d.ts.map +1 -1
  128. package/build/types/fetch.d.ts +12 -8
  129. package/build/types/fetch.d.ts.map +1 -1
  130. package/build/types/index.d.ts +5 -2
  131. package/build/types/index.d.ts.map +1 -1
  132. package/build/types/integration.d.ts.map +1 -1
  133. package/build/types/integrations/conversationId.d.ts.map +1 -1
  134. package/build/types/integrations/express/index.d.ts +10 -3
  135. package/build/types/integrations/express/index.d.ts.map +1 -1
  136. package/build/types/integrations/express/patch-layer.d.ts +1 -1
  137. package/build/types/integrations/express/patch-layer.d.ts.map +1 -1
  138. package/build/types/integrations/express/types.d.ts +5 -1
  139. package/build/types/integrations/express/types.d.ts.map +1 -1
  140. package/build/types/tracing/ai/gen-ai-attributes.d.ts +0 -8
  141. package/build/types/tracing/ai/gen-ai-attributes.d.ts.map +1 -1
  142. package/build/types/tracing/ai/utils.d.ts +13 -0
  143. package/build/types/tracing/ai/utils.d.ts.map +1 -1
  144. package/build/types/tracing/anthropic-ai/index.d.ts.map +1 -1
  145. package/build/types/tracing/anthropic-ai/types.d.ts +5 -0
  146. package/build/types/tracing/anthropic-ai/types.d.ts.map +1 -1
  147. package/build/types/tracing/anthropic-ai/utils.d.ts +1 -1
  148. package/build/types/tracing/anthropic-ai/utils.d.ts.map +1 -1
  149. package/build/types/tracing/google-genai/index.d.ts.map +1 -1
  150. package/build/types/tracing/google-genai/types.d.ts +5 -0
  151. package/build/types/tracing/google-genai/types.d.ts.map +1 -1
  152. package/build/types/tracing/langchain/index.d.ts.map +1 -1
  153. package/build/types/tracing/langchain/types.d.ts +5 -0
  154. package/build/types/tracing/langchain/types.d.ts.map +1 -1
  155. package/build/types/tracing/langchain/utils.d.ts +2 -2
  156. package/build/types/tracing/langchain/utils.d.ts.map +1 -1
  157. package/build/types/tracing/langgraph/index.d.ts.map +1 -1
  158. package/build/types/tracing/langgraph/types.d.ts +5 -0
  159. package/build/types/tracing/langgraph/types.d.ts.map +1 -1
  160. package/build/types/tracing/openai/index.d.ts.map +1 -1
  161. package/build/types/tracing/openai/types.d.ts +5 -0
  162. package/build/types/tracing/openai/types.d.ts.map +1 -1
  163. package/build/types/tracing/sentrySpan.d.ts.map +1 -1
  164. package/build/types/tracing/spans/captureSpan.d.ts.map +1 -1
  165. package/build/types/tracing/spans/extractGenAiSpans.d.ts +15 -0
  166. package/build/types/tracing/spans/extractGenAiSpans.d.ts.map +1 -0
  167. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts +6 -0
  168. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts.map +1 -0
  169. package/build/types/tracing/trace.d.ts.map +1 -1
  170. package/build/types/tracing/utils.d.ts.map +1 -1
  171. package/build/types/tracing/vercel-ai/constants.d.ts +2 -5
  172. package/build/types/tracing/vercel-ai/constants.d.ts.map +1 -1
  173. package/build/types/tracing/vercel-ai/index.d.ts.map +1 -1
  174. package/build/types/tracing/vercel-ai/utils.d.ts +1 -5
  175. package/build/types/tracing/vercel-ai/utils.d.ts.map +1 -1
  176. package/build/types/tracing/vercel-ai/vercel-ai-attributes.d.ts +0 -480
  177. package/build/types/tracing/vercel-ai/vercel-ai-attributes.d.ts.map +1 -1
  178. package/build/types/types-hoist/clientreport.d.ts +1 -1
  179. package/build/types/types-hoist/clientreport.d.ts.map +1 -1
  180. package/build/types/types-hoist/envelope.d.ts +1 -1
  181. package/build/types/types-hoist/envelope.d.ts.map +1 -1
  182. package/build/types/types-hoist/integration.d.ts +13 -0
  183. package/build/types/types-hoist/integration.d.ts.map +1 -1
  184. package/build/types/types-hoist/replay.d.ts +25 -0
  185. package/build/types/types-hoist/replay.d.ts.map +1 -1
  186. package/build/types/types-hoist/view-hierarchy.d.ts +1 -0
  187. package/build/types/types-hoist/view-hierarchy.d.ts.map +1 -1
  188. package/build/types/utils/browser.d.ts +1 -1
  189. package/build/types/utils/browser.d.ts.map +1 -1
  190. package/build/types/utils/weakRef.d.ts +34 -0
  191. package/build/types/utils/weakRef.d.ts.map +1 -0
  192. package/build/types-ts3.8/build-time-plugins/buildTimeOptionsBase.d.ts +13 -0
  193. package/build/types-ts3.8/client.d.ts +20 -0
  194. package/build/types-ts3.8/fetch.d.ts +14 -10
  195. package/build/types-ts3.8/index.d.ts +5 -2
  196. package/build/types-ts3.8/integrations/express/index.d.ts +10 -3
  197. package/build/types-ts3.8/integrations/express/patch-layer.d.ts +1 -1
  198. package/build/types-ts3.8/integrations/express/types.d.ts +5 -1
  199. package/build/types-ts3.8/tracing/ai/gen-ai-attributes.d.ts +0 -8
  200. package/build/types-ts3.8/tracing/ai/utils.d.ts +13 -0
  201. package/build/types-ts3.8/tracing/anthropic-ai/types.d.ts +5 -0
  202. package/build/types-ts3.8/tracing/anthropic-ai/utils.d.ts +1 -1
  203. package/build/types-ts3.8/tracing/google-genai/types.d.ts +5 -0
  204. package/build/types-ts3.8/tracing/langchain/types.d.ts +5 -0
  205. package/build/types-ts3.8/tracing/langchain/utils.d.ts +2 -2
  206. package/build/types-ts3.8/tracing/langgraph/types.d.ts +5 -0
  207. package/build/types-ts3.8/tracing/openai/types.d.ts +5 -0
  208. package/build/types-ts3.8/tracing/spans/extractGenAiSpans.d.ts +15 -0
  209. package/build/types-ts3.8/tracing/spans/spanJsonToStreamedSpan.d.ts +6 -0
  210. package/build/types-ts3.8/tracing/vercel-ai/constants.d.ts +2 -5
  211. package/build/types-ts3.8/tracing/vercel-ai/utils.d.ts +1 -5
  212. package/build/types-ts3.8/tracing/vercel-ai/vercel-ai-attributes.d.ts +0 -480
  213. package/build/types-ts3.8/types-hoist/clientreport.d.ts +1 -1
  214. package/build/types-ts3.8/types-hoist/envelope.d.ts +1 -1
  215. package/build/types-ts3.8/types-hoist/integration.d.ts +13 -0
  216. package/build/types-ts3.8/types-hoist/replay.d.ts +25 -0
  217. package/build/types-ts3.8/types-hoist/view-hierarchy.d.ts +1 -0
  218. package/build/types-ts3.8/utils/browser.d.ts +1 -1
  219. package/build/types-ts3.8/utils/weakRef.d.ts +34 -0
  220. package/package.json +1 -1
@@ -22,4 +22,29 @@ export type ReplayRecordingData = string | Uint8Array;
22
22
  * @hidden
23
23
  */
24
24
  export type ReplayRecordingMode = 'session' | 'buffer';
25
+ /**
26
+ * Reason a replay recording stopped, passed to the `replayEnd` client hook.
27
+ *
28
+ * - `manual`: user called `replay.stop()`.
29
+ * - `sessionExpired`: session hit `maxReplayDuration` or the idle-expiry threshold.
30
+ * - `sendError`: a replay segment failed to send after retries.
31
+ * - `mutationLimit`: DOM mutation budget for the session was exhausted.
32
+ * - `eventBufferError`: the event buffer threw an unexpected error.
33
+ * - `eventBufferOverflow`: the event buffer ran out of space.
34
+ */
35
+ export type ReplayStopReason = 'manual' | 'sessionExpired' | 'sendError' | 'mutationLimit' | 'eventBufferError' | 'eventBufferOverflow';
36
+ /**
37
+ * Payload emitted on the `replayStart` client hook when a replay begins recording.
38
+ */
39
+ export interface ReplayStartEvent {
40
+ sessionId: string;
41
+ recordingMode: ReplayRecordingMode;
42
+ }
43
+ /**
44
+ * Payload emitted on the `replayEnd` client hook when a replay stops recording.
45
+ */
46
+ export interface ReplayEndEvent {
47
+ sessionId?: string;
48
+ reason: ReplayStopReason;
49
+ }
25
50
  //# sourceMappingURL=replay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/replay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK;IACxC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,mBAAmB,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/replay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK;IACxC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,mBAAmB,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,gBAAgB,GAChB,WAAW,GACX,eAAe,GACf,kBAAkB,GAClB,qBAAqB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,mBAAmB,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
@@ -13,6 +13,7 @@ export type ViewHierarchyWindow = {
13
13
  } & Record<string, string | number | boolean>;
14
14
  export type ViewHierarchyData = {
15
15
  rendering_system: string;
16
+ positioning?: 'absolute' | 'relative';
16
17
  windows: ViewHierarchyWindow[];
17
18
  };
18
19
  //# sourceMappingURL=view-hierarchy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"view-hierarchy.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/view-hierarchy.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC,CAAC"}
1
+ {"version":3,"file":"view-hierarchy.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/view-hierarchy.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACtC,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC,CAAC"}
@@ -19,5 +19,5 @@ export declare function getLocationHref(): string;
19
19
  *
20
20
  * @returns a string representation of the component for the provided DOM element, or `null` if not found
21
21
  */
22
- export declare function getComponentName(elem: unknown): string | null;
22
+ export declare function getComponentName(elem: unknown, maxTraverseHeight?: number): string | null;
23
23
  //# sourceMappingURL=browser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/utils/browser.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,MAAM,EAAE,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAO,GACzE,MAAM,CAyCR;AAoED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAMxC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CA0B7D"}
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/utils/browser.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,MAAM,EAAE,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAO,GACzE,MAAM,CAyCR;AAoED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAMxC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,iBAAiB,GAAE,MAAU,GAAG,MAAM,GAAG,IAAI,CAyB5F"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Interface representing a weak reference to an object.
3
+ * This matches the standard WeakRef interface but is defined here
4
+ * because WeakRef is not available in ES2020 type definitions.
5
+ */
6
+ interface WeakRefLike<T extends object> {
7
+ deref(): T | undefined;
8
+ }
9
+ /**
10
+ * A wrapper type that represents either a WeakRef-like object or a direct reference.
11
+ * Used for optional weak referencing in environments where WeakRef may not be available.
12
+ */
13
+ export type MaybeWeakRef<T extends object> = WeakRefLike<T> | T;
14
+ /**
15
+ * Creates a weak reference to an object if WeakRef is available,
16
+ * otherwise returns the object directly.
17
+ *
18
+ * This is useful for breaking circular references while maintaining
19
+ * compatibility with environments that don't support WeakRef (e.g., older browsers).
20
+ *
21
+ * @param value - The object to create a weak reference to
22
+ * @returns A WeakRef wrapper if available, or the original object as fallback
23
+ */
24
+ export declare function makeWeakRef<T extends object>(value: T): MaybeWeakRef<T>;
25
+ /**
26
+ * Resolves a potentially weak reference, returning the underlying object
27
+ * or undefined if the reference has been garbage collected.
28
+ *
29
+ * @param ref - A MaybeWeakRef or undefined
30
+ * @returns The referenced object, or undefined if GC'd or ref was undefined
31
+ */
32
+ export declare function derefWeakRef<T extends object>(ref: MaybeWeakRef<T> | undefined): T | undefined;
33
+ export {};
34
+ //# sourceMappingURL=weakRef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weakRef.d.ts","sourceRoot":"","sources":["../../../src/utils/weakRef.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,UAAU,WAAW,CAAC,CAAC,SAAS,MAAM;IACpC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAEhE;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAWvE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC,GAAG,SAAS,CAiB9F"}
@@ -223,6 +223,19 @@ interface SourceMapsOptions {
223
223
  * The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
224
224
  */
225
225
  filesToDeleteAfterUpload?: string | Array<string>;
226
+ /**
227
+ * Hook to rewrite the `sources` field inside the source map before being uploaded to Sentry. Does not modify the actual source map.
228
+ *
229
+ * The hook receives the following arguments:
230
+ * - `source` - the source file path from the source map's `sources` field
231
+ * - `map` - the source map object
232
+ * - `context` - an optional object containing `mapDir`, the absolute path to the directory of the source map file
233
+ *
234
+ * Defaults to making all sources relative to `process.cwd()` while building.
235
+ */
236
+ rewriteSources?: (source: string, map: any, context?: {
237
+ mapDir: string;
238
+ }) => string;
226
239
  }
227
240
  type AutoSetCommitsOptions = {
228
241
  /**
@@ -14,6 +14,7 @@ import { Log } from './types-hoist/log';
14
14
  import { Metric } from './types-hoist/metric';
15
15
  import { ClientOptions } from './types-hoist/options';
16
16
  import { ParameterizedString } from './types-hoist/parameterize';
17
+ import { ReplayEndEvent, ReplayStartEvent } from './types-hoist/replay';
17
18
  import { RequestEventData } from './types-hoist/request';
18
19
  import { SdkMetadata } from './types-hoist/sdkmetadata';
19
20
  import { Session, SessionAggregates } from './types-hoist/session';
@@ -298,6 +299,17 @@ export declare abstract class Client<O extends ClientOptions = ClientOptions> {
298
299
  * Register a callback when the feedback widget is opened in a user's browser
299
300
  */
300
301
  on(hook: 'openFeedbackWidget', callback: () => void): () => void;
302
+ /**
303
+ * A hook that is called when a replay session starts recording (either session or buffer mode).
304
+ * @returns {() => void} A function that, when executed, removes the registered callback.
305
+ */
306
+ on(hook: 'replayStart', callback: (event: ReplayStartEvent) => void): () => void;
307
+ /**
308
+ * A hook that is called when a replay session stops recording, either manually or due to an
309
+ * internal condition such as `maxReplayDuration` expiry, send failure, or mutation limit.
310
+ * @returns {() => void} A function that, when executed, removes the registered callback.
311
+ */
312
+ on(hook: 'replayEnd', callback: (event: ReplayEndEvent) => void): () => void;
301
313
  /**
302
314
  * A hook for the browser tracing integrations to trigger a span start for a page load.
303
315
  * @returns {() => void} A function that, when executed, removes the registered callback.
@@ -498,6 +510,14 @@ export declare abstract class Client<O extends ClientOptions = ClientOptions> {
498
510
  * Fire a hook event for when the feedback widget is opened in a user's browser
499
511
  */
500
512
  emit(hook: 'openFeedbackWidget'): void;
513
+ /**
514
+ * Fire a hook event when a replay session starts recording.
515
+ */
516
+ emit(hook: 'replayStart', event: ReplayStartEvent): void;
517
+ /**
518
+ * Fire a hook event when a replay session stops recording.
519
+ */
520
+ emit(hook: 'replayEnd', event: ReplayEndEvent): void;
501
521
  /**
502
522
  * Emit a hook event for browser tracing integrations to trigger a span start for a page load.
503
523
  */
@@ -1,10 +1,10 @@
1
1
  import { HandlerDataFetch } from './types-hoist/instrument';
2
2
  import { ResponseHookInfo } from './types-hoist/request';
3
3
  import { Span, SpanOrigin } from './types-hoist/span';
4
- type PolymorphicRequestHeaders = Record<string, string | undefined> | Array<[
4
+ type PolymorphicRequestHeaders = Record<string, unknown> | Array<[
5
5
  string,
6
- string
7
- ]> | {
6
+ unknown
7
+ ]> | Iterable<Iterable<unknown>> | {
8
8
  append: (key: string, value: string) => void;
9
9
  get: (key: string) => string | null | undefined;
10
10
  };
@@ -32,15 +32,19 @@ export declare function instrumentFetchRequest(handlerData: HandlerDataFetch, sh
32
32
  */
33
33
  export declare function _callOnRequestSpanEnd(span: Span, handlerData: HandlerDataFetch, spanOriginOrOptions?: SpanOrigin | InstrumentFetchRequestOptions): void;
34
34
  /**
35
- * Adds sentry-trace and baggage headers to the various forms of fetch headers.
36
- * exported only for testing purposes
35
+ * Builds merged fetch headers that include `sentry-trace` and `baggage` (and optionally `traceparent`)
36
+ * for the given request and init, without mutating the original request or options.
37
+ * Returns `undefined` when there is no `sentry-trace` value to attach.
37
38
  *
38
- * When we determine if we should add a baggage header, there are 3 cases:
39
- * 1. No previous baggage header -> add baggage
40
- * 2. Previous baggage header has no sentry baggage values -> add our baggage
41
- * 3. Previous baggage header has sentry baggage values -> do nothing (might have been added manually by users)
39
+ * @internal Exported for cross-package instrumentation (for example Cloudflare Workers fetcher bindings)
40
+ * and unit tests
41
+ *
42
+ * Baggage handling:
43
+ * 1. No previous baggage header → include Sentry baggage
44
+ * 2. Previous baggage has no Sentry entries → merge Sentry baggage in
45
+ * 3. Previous baggage already has Sentry entries → leave as-is (may be user-defined)
42
46
  */
43
- export declare function _addTracingHeadersToFetchRequest(request: string | Request, fetchOptionsObj: {
47
+ export declare function _INTERNAL_getTracingHeadersForFetchRequest(request: string | URL | Request, fetchOptionsObj: {
44
48
  headers?: {
45
49
  [key: string]: string[] | string | undefined;
46
50
  } | PolymorphicRequestHeaders;
@@ -48,6 +48,8 @@ export { getTraceData } from './utils/traceData';
48
48
  export { shouldPropagateTraceForUrl } from './utils/tracePropagationTargets';
49
49
  export { getTraceMetaTags } from './utils/meta';
50
50
  export { debounce } from './utils/debounce';
51
+ export { makeWeakRef, derefWeakRef } from './utils/weakRef';
52
+ export { MaybeWeakRef } from './utils/weakRef';
51
53
  export { shouldIgnoreSpan } from './utils/should-ignore-span';
52
54
  export { winterCGHeadersToDict, winterCGRequestToRequestData, httpRequestToRequestData, extractQueryParamsFromUrl, headersToDict, httpHeadersToSpanAttributes, } from './utils/request';
53
55
  export { DEFAULT_ENVIRONMENT, DEV_ENVIRONMENT } from './constants';
@@ -73,7 +75,7 @@ export { featureFlagsIntegration, FeatureFlagsIntegration } from './integrations
73
75
  export { growthbookIntegration } from './integrations/featureFlags';
74
76
  export { conversationIdIntegration } from './integrations/conversationId';
75
77
  export { profiler } from './profiling';
76
- export { instrumentFetchRequest } from './fetch';
78
+ export { instrumentFetchRequest, _INTERNAL_getTracingHeadersForFetchRequest } from './fetch';
77
79
  export { trpcMiddleware } from './trpc';
78
80
  export { wrapMcpServerWithSentry } from './integrations/mcp-server';
79
81
  export { captureFeedback } from './feedback';
@@ -181,7 +183,7 @@ export { ClientOptions, CoreOptions as Options, ServerRuntimeOptions } from './t
181
183
  export { Package } from './types-hoist/package';
182
184
  export { PolymorphicEvent, PolymorphicRequest } from './types-hoist/polymorphics';
183
185
  export { ThreadId, FrameId, StackId, ThreadCpuSample, ThreadCpuStack, ThreadCpuFrame, ThreadCpuProfile, ContinuousThreadCpuProfile, Profile, ProfileChunk, } from './types-hoist/profiling';
184
- export { ReplayEvent, ReplayRecordingData, ReplayRecordingMode } from './types-hoist/replay';
186
+ export { ReplayEndEvent, ReplayEvent, ReplayRecordingData, ReplayRecordingMode, ReplayStartEvent, ReplayStopReason, } from './types-hoist/replay';
185
187
  export { FeedbackEvent, FeedbackFormData, FeedbackInternalOptions, FeedbackModalIntegration, FeedbackScreenshotIntegration, SendFeedback, SendFeedbackParams, UserFeedback, } from './types-hoist/feedback';
186
188
  export { QueryParams, RequestEventData, RequestHookInfo, ResponseHookInfo, SanitizedRequestData, } from './types-hoist/request';
187
189
  export { Runtime } from './types-hoist/runtime';
@@ -192,6 +194,7 @@ export { SeverityLevel } from './types-hoist/severity';
192
194
  export { Span, SentrySpanArguments, SpanOrigin, SpanAttributeValue, SpanAttributes, SpanTimeInput, SpanJSON, SpanContextData, TraceFlag, SerializedStreamedSpan, SerializedStreamedSpanContainer, StreamedSpanJSON, } from './types-hoist/span';
193
195
  export { SpanStatus } from './types-hoist/spanStatus';
194
196
  export { Log, LogSeverityLevel } from './types-hoist/log';
197
+ export { SpanLink } from './types-hoist/link';
195
198
  export { Metric, MetricType, SerializedMetric, SerializedMetricContainer, SerializedMetricAttributeValue, } from './types-hoist/metric';
196
199
  export { TimedEvent } from './types-hoist/timedEvent';
197
200
  export { StackFrame } from './types-hoist/stackframe';
@@ -26,7 +26,7 @@
26
26
  * See the License for the specific language governing permissions and
27
27
  * limitations under the License.
28
28
  */
29
- import { ExpressErrorMiddleware, ExpressExport, ExpressHandlerOptions, ExpressIntegrationOptions } from './types';
29
+ import { ExpressErrorMiddleware, ExpressHandlerOptions, ExpressIntegrationOptions, ExpressModuleExport } from './types';
30
30
  /**
31
31
  * This is a portable instrumentatiton function that works in any environment
32
32
  * where Express can be loaded, without depending on OpenTelemetry.
@@ -36,9 +36,16 @@ import { ExpressErrorMiddleware, ExpressExport, ExpressHandlerOptions, ExpressIn
36
36
  * import express from 'express';
37
37
  * import * as Sentry from '@sentry/deno'; // or any SDK that extends core
38
38
  *
39
- * Sentry.patchExpressModule({ express })
39
+ * Sentry.patchExpressModule(express, () => ({}));
40
+ * ```
41
+ */
42
+ export declare function patchExpressModule(moduleExports: ExpressModuleExport, getOptions: () => ExpressIntegrationOptions): ExpressModuleExport;
43
+ /**
44
+ * @deprecated Pass the Express module export as the first argument and options getter as the second argument.
40
45
  */
41
- export declare const patchExpressModule: (options: ExpressIntegrationOptions) => ExpressExport;
46
+ export declare function patchExpressModule(options: ExpressIntegrationOptions & {
47
+ express: ExpressModuleExport;
48
+ }): ExpressModuleExport;
42
49
  /**
43
50
  * An Express-compatible error handler, used by setupExpressErrorHandler
44
51
  */
@@ -28,5 +28,5 @@
28
28
  */
29
29
  import { ExpressIntegrationOptions, ExpressLayer } from './types';
30
30
  export type ExpressPatchLayerOptions = Pick<ExpressIntegrationOptions, 'onRouteResolved' | 'ignoreLayers' | 'ignoreLayersType'>;
31
- export declare function patchLayer(options: ExpressPatchLayerOptions, maybeLayer?: ExpressLayer, layerPath?: string): void;
31
+ export declare function patchLayer(getOptions: () => ExpressPatchLayerOptions, maybeLayer?: ExpressLayer, layerPath?: string): void;
32
32
  //# sourceMappingURL=patch-layer.d.ts.map
@@ -114,7 +114,11 @@ export type ExpressRouter = {
114
114
  };
115
115
  export type IgnoreMatcher = string | RegExp | ((name: string) => boolean);
116
116
  export type ExpressIntegrationOptions = {
117
- express: ExpressModuleExport;
117
+ /**
118
+ * @deprecated Pass the express module as the first argument, and an
119
+ * options getter as the second argument to patchExpressModule.
120
+ */
121
+ express?: ExpressModuleExport;
118
122
  /** Ignore specific based on their name */
119
123
  ignoreLayers?: IgnoreMatcher[];
120
124
  /** Ignore specific layers based on their type */
@@ -177,14 +177,6 @@ export declare const GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE = "gen_ai.embeddings.inpu
177
177
  * The span operation for embeddings
178
178
  */
179
179
  export declare const GEN_AI_EMBEDDINGS_OPERATION_ATTRIBUTE = "gen_ai.embeddings";
180
- /**
181
- * The span operation name for embedding
182
- */
183
- export declare const GEN_AI_EMBED_DO_EMBED_OPERATION_ATTRIBUTE = "gen_ai.embeddings";
184
- /**
185
- * The span operation name for embedding many
186
- */
187
- export declare const GEN_AI_EMBED_MANY_DO_EMBED_OPERATION_ATTRIBUTE = "gen_ai.embeddings";
188
180
  /**
189
181
  * The span operation name for reranking
190
182
  */
@@ -26,6 +26,14 @@ export type InstrumentedMethodRegistry = Record<string, InstrumentedMethodEntry>
26
26
  * Precedence: explicit option > sendDefaultPii > false
27
27
  */
28
28
  export declare function resolveAIRecordingOptions<T extends AIRecordingOptions>(options?: T): T & Required<AIRecordingOptions>;
29
+ /**
30
+ * Resolves whether truncation should be enabled.
31
+ * If the user explicitly set `enableTruncation`, that value is used.
32
+ * Otherwise, truncation defaults to off: gen_ai spans always travel as v2
33
+ * spans (either via span streaming or extraction from the legacy transaction),
34
+ * so the legacy transaction size cap that motivated truncation no longer applies.
35
+ */
36
+ export declare function shouldEnableTruncation(enableTruncation: boolean | undefined): boolean;
29
37
  /**
30
38
  * Build method path from current traversal
31
39
  */
@@ -56,6 +64,11 @@ export interface StreamResponseState {
56
64
  * Shared across OpenAI, Anthropic, and Google GenAI streaming implementations.
57
65
  */
58
66
  export declare function endStreamSpan(span: Span, state: StreamResponseState, recordOutputs: boolean): void;
67
+ /**
68
+ * Serialize a value to a JSON string without truncation.
69
+ * Strings are returned as-is, arrays and objects are JSON-stringified.
70
+ */
71
+ export declare function getJsonString<T>(value: T | T[]): string;
59
72
  /**
60
73
  * Get the truncated JSON string for a string or array of strings.
61
74
  *
@@ -8,6 +8,11 @@ export interface AnthropicAiOptions {
8
8
  * Enable or disable output recording.
9
9
  */
10
10
  recordOutputs?: boolean;
11
+ /**
12
+ * Enable or disable truncation of recorded input messages.
13
+ * Defaults to `true`.
14
+ */
15
+ enableTruncation?: boolean;
11
16
  }
12
17
  export type Message = {
13
18
  role: 'user' | 'assistant';
@@ -5,7 +5,7 @@ import { AnthropicAiResponse } from './types';
5
5
  * Set the messages and messages original length attributes.
6
6
  * Extracts system instructions before truncation.
7
7
  */
8
- export declare function setMessagesAttribute(span: Span, messages: unknown): void;
8
+ export declare function setMessagesAttribute(span: Span, messages: unknown, enableTruncation: boolean): void;
9
9
  /**
10
10
  * Map an Anthropic API error type to a SpanStatusType value.
11
11
  * @see https://docs.anthropic.com/en/api/errors#error-shapes
@@ -8,6 +8,11 @@ export interface GoogleGenAIOptions {
8
8
  * Enable or disable output recording.
9
9
  */
10
10
  recordOutputs?: boolean;
11
+ /**
12
+ * Enable or disable truncation of recorded input messages.
13
+ * Defaults to `true`.
14
+ */
15
+ enableTruncation?: boolean;
11
16
  }
12
17
  /**
13
18
  * Google GenAI Content Part
@@ -12,6 +12,11 @@ export interface LangChainOptions {
12
12
  * @default false (respects sendDefaultPii option)
13
13
  */
14
14
  recordOutputs?: boolean;
15
+ /**
16
+ * Enable or disable truncation of recorded input messages.
17
+ * Defaults to `true`.
18
+ */
19
+ enableTruncation?: boolean;
15
20
  }
16
21
  /**
17
22
  * LangChain Serialized type (compatible with @langchain/core)
@@ -36,7 +36,7 @@ export declare function normalizeLangChainMessages(messages: LangChainMessage[])
36
36
  * - When `recordInputs` is true, string prompts are wrapped into `{role:"user"}`
37
37
  * messages to align with the chat schema used elsewhere.
38
38
  */
39
- export declare function extractLLMRequestAttributes(llm: LangChainSerialized, prompts: string[], recordInputs: boolean, invocationParams?: Record<string, unknown>, langSmithMetadata?: Record<string, unknown>): Record<string, SpanAttributeValue>;
39
+ export declare function extractLLMRequestAttributes(llm: LangChainSerialized, prompts: string[], recordInputs: boolean, enableTruncation: boolean, invocationParams?: Record<string, unknown>, langSmithMetadata?: Record<string, unknown>): Record<string, SpanAttributeValue>;
40
40
  /**
41
41
  * Extracts attributes for ChatModel invocations (array-of-arrays of messages).
42
42
  *
@@ -46,7 +46,7 @@ export declare function extractLLMRequestAttributes(llm: LangChainSerialized, pr
46
46
  * consistent `{ role, content }` array when `recordInputs` is true.
47
47
  * - Provider system value falls back to `serialized.id?.[2]`.
48
48
  */
49
- export declare function extractChatModelRequestAttributes(llm: LangChainSerialized, langChainMessages: LangChainMessage[][], recordInputs: boolean, invocationParams?: Record<string, unknown>, langSmithMetadata?: Record<string, unknown>): Record<string, SpanAttributeValue>;
49
+ export declare function extractChatModelRequestAttributes(llm: LangChainSerialized, langChainMessages: LangChainMessage[][], recordInputs: boolean, enableTruncation: boolean, invocationParams?: Record<string, unknown>, langSmithMetadata?: Record<string, unknown>): Record<string, SpanAttributeValue>;
50
50
  /**
51
51
  * Extracts response-related attributes based on a `LangChainLLMResult`.
52
52
  *
@@ -7,6 +7,11 @@ export interface LangGraphOptions {
7
7
  * Enable or disable output recording.
8
8
  */
9
9
  recordOutputs?: boolean;
10
+ /**
11
+ * Enable or disable truncation of recorded input messages.
12
+ * Defaults to `true`.
13
+ */
14
+ enableTruncation?: boolean;
10
15
  }
11
16
  /**
12
17
  * LangGraph Tool definition from lc_kwargs
@@ -14,6 +14,11 @@ export interface OpenAiOptions {
14
14
  * Enable or disable output recording.
15
15
  */
16
16
  recordOutputs?: boolean;
17
+ /**
18
+ * Enable or disable truncation of recorded input messages.
19
+ * Defaults to `true`.
20
+ */
21
+ enableTruncation?: boolean;
17
22
  }
18
23
  export interface OpenAiClient {
19
24
  responses?: {
@@ -0,0 +1,15 @@
1
+ import { Client } from '../../client';
2
+ import { SpanContainerItem } from '../../types-hoist/envelope';
3
+ import { Event } from '../../types-hoist/event';
4
+ /**
5
+ * Extracts gen_ai spans from a transaction event, converts them to span v2 format,
6
+ * and returns them as a SpanContainerItem.
7
+ *
8
+ * Only applies to static mode (non-streaming) transactions.
9
+ *
10
+ * WARNING: This function mutates `event.spans` by removing the extracted gen_ai spans
11
+ * from the array. Call this before creating the event envelope so the transaction
12
+ * item does not include the extracted spans.
13
+ */
14
+ export declare function extractGenAiSpansFromEvent(event: Event, client: Client): SpanContainerItem | undefined;
15
+ //# sourceMappingURL=extractGenAiSpans.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { SerializedStreamedSpan, SpanJSON } from '../../types-hoist/span';
2
+ /**
3
+ * Converts a v1 SpanJSON (from a legacy transaction) to a serialized v2 StreamedSpan.
4
+ */
5
+ export declare function spanJsonToSerializedStreamedSpan(span: SpanJSON): SerializedStreamedSpan;
6
+ //# sourceMappingURL=spanJsonToStreamedSpan.d.ts.map
@@ -1,8 +1,5 @@
1
1
  import { ToolCallSpanContext } from './types';
2
2
  export declare const toolCallSpanContextMap: Map<string, ToolCallSpanContext>;
3
- export declare const INVOKE_AGENT_OPS: Set<string>;
4
- export declare const GENERATE_CONTENT_OPS: Set<string>;
5
- export declare const EMBEDDINGS_OPS: Set<string>;
6
- export declare const RERANK_OPS: Set<string>;
7
- export declare const DO_SPAN_NAME_PREFIX: Record<string, string>;
3
+ /** Maps Vercel AI span names to standardized OpenTelemetry operation names. */
4
+ export declare const SPAN_TO_OPERATION_NAME: Map<string, string>;
8
5
  //# sourceMappingURL=constants.d.ts.map
@@ -44,9 +44,5 @@ export declare function convertUserInputToMessagesFormat(userInput: string): {
44
44
  * Generate a request.messages JSON array from the prompt field in the
45
45
  * invoke_agent op
46
46
  */
47
- export declare function requestMessagesFromPrompt(span: Span, attributes: SpanAttributes): void;
48
- /**
49
- * Maps a Vercel AI span name to the corresponding Sentry op.
50
- */
51
- export declare function getSpanOpFromName(name: string): string | undefined;
47
+ export declare function requestMessagesFromPrompt(span: Span, attributes: SpanAttributes, enableTruncation: boolean): void;
52
48
  //# sourceMappingURL=utils.d.ts.map