@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
@@ -30,24 +30,6 @@ export declare const AI_PROMPT_ATTRIBUTE = "ai.prompt";
30
30
  * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function
31
31
  */
32
32
  export declare const AI_SCHEMA_ATTRIBUTE = "ai.schema";
33
- /**
34
- * `generateObject` function - `ai.generateObject` span
35
- * `streamObject` function - `ai.streamObject` span
36
- *
37
- * The name of the schema that was passed into the function
38
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function
39
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function
40
- */
41
- export declare const AI_SCHEMA_NAME_ATTRIBUTE = "ai.schema.name";
42
- /**
43
- * `generateObject` function - `ai.generateObject` span
44
- * `streamObject` function - `ai.streamObject` span
45
- *
46
- * The description of the schema that was passed into the function
47
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function
48
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function
49
- */
50
- export declare const AI_SCHEMA_DESCRIPTION_ATTRIBUTE = "ai.schema.description";
51
33
  /**
52
34
  * `generateObject` function - `ai.generateObject` span
53
35
  * `streamObject` function - `ai.streamObject` span
@@ -57,24 +39,6 @@ export declare const AI_SCHEMA_DESCRIPTION_ATTRIBUTE = "ai.schema.description";
57
39
  * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function
58
40
  */
59
41
  export declare const AI_RESPONSE_OBJECT_ATTRIBUTE = "ai.response.object";
60
- /**
61
- * `generateObject` function - `ai.generateObject` span
62
- * `streamObject` function - `ai.streamObject` span
63
- *
64
- * The object generation mode, e.g. `json`
65
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function
66
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function
67
- */
68
- export declare const AI_SETTINGS_MODE_ATTRIBUTE = "ai.settings.mode";
69
- /**
70
- * `generateObject` function - `ai.generateObject` span
71
- * `streamObject` function - `ai.streamObject` span
72
- *
73
- * The output type that was used, e.g. `object` or `no-schema`
74
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function
75
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function
76
- */
77
- export declare const AI_SETTINGS_OUTPUT_ATTRIBUTE = "ai.settings.output";
78
42
  /**
79
43
  * `embed` function - `ai.embed.doEmbed` span
80
44
  * `embedMany` function - `ai.embedMany` span
@@ -84,15 +48,6 @@ export declare const AI_SETTINGS_OUTPUT_ATTRIBUTE = "ai.settings.output";
84
48
  * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embedmany-function
85
49
  */
86
50
  export declare const AI_VALUES_ATTRIBUTE = "ai.values";
87
- /**
88
- * `embed` function - `ai.embed.doEmbed` span
89
- * `embedMany` function - `ai.embedMany` span
90
- *
91
- * An array of JSON-stringified embeddings
92
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embed-function
93
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embedmany-function
94
- */
95
- export declare const AI_EMBEDDINGS_ATTRIBUTE = "ai.embeddings";
96
51
  /**
97
52
  * `generateText` function - `ai.generateText` span
98
53
  *
@@ -121,13 +76,6 @@ export declare const AI_RESPONSE_FINISH_REASON_ATTRIBUTE = "ai.response.finishRe
121
76
  * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
122
77
  */
123
78
  export declare const AI_SETTINGS_MAX_STEPS_ATTRIBUTE = "ai.settings.maxSteps";
124
- /**
125
- * `generateText` function - `ai.generateText.doGenerate` span
126
- *
127
- * The format of the prompt
128
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
129
- */
130
- export declare const AI_PROMPT_FORMAT_ATTRIBUTE = "ai.prompt.format";
131
79
  /**
132
80
  * `generateText` function - `ai.generateText.doGenerate` span
133
81
  *
@@ -142,56 +90,6 @@ export declare const AI_PROMPT_MESSAGES_ATTRIBUTE = "ai.prompt.messages";
142
90
  * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
143
91
  */
144
92
  export declare const AI_PROMPT_TOOLS_ATTRIBUTE = "ai.prompt.tools";
145
- /**
146
- * `generateText` function - `ai.generateText.doGenerate` span
147
- *
148
- * The stringified tool choice setting (JSON)
149
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
150
- */
151
- export declare const AI_PROMPT_TOOL_CHOICE_ATTRIBUTE = "ai.prompt.toolChoice";
152
- /**
153
- * `streamText` function - `ai.streamText.doStream` span
154
- *
155
- * The time it took to receive the first chunk in milliseconds
156
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamtext-function
157
- */
158
- export declare const AI_RESPONSE_MS_TO_FIRST_CHUNK_ATTRIBUTE = "ai.response.msToFirstChunk";
159
- /**
160
- * `streamText` function - `ai.streamText.doStream` span
161
- *
162
- * The time it took to receive the finish part of the LLM stream in milliseconds
163
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamtext-function
164
- */
165
- export declare const AI_RESPONSE_MS_TO_FINISH_ATTRIBUTE = "ai.response.msToFinish";
166
- /**
167
- * `streamText` function - `ai.streamText.doStream` span
168
- *
169
- * The average completion tokens per second
170
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamtext-function
171
- */
172
- export declare const AI_RESPONSE_AVG_COMPLETION_TOKENS_PER_SECOND_ATTRIBUTE = "ai.response.avgCompletionTokensPerSecond";
173
- /**
174
- * `embed` function - `ai.embed` span
175
- *
176
- * The value that was passed into the `embed` function
177
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embed-function
178
- */
179
- export declare const AI_VALUE_ATTRIBUTE = "ai.value";
180
- /**
181
- * `embed` function - `ai.embed` span
182
- *
183
- * A JSON-stringified embedding
184
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embed-function
185
- */
186
- export declare const AI_EMBEDDING_ATTRIBUTE = "ai.embedding";
187
- /**
188
- * Basic LLM span information
189
- * Multiple spans
190
- *
191
- * The functionId that was set through `telemetry.functionId`
192
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
193
- */
194
- export declare const RESOURCE_NAME_ATTRIBUTE = "resource.name";
195
93
  /**
196
94
  * Basic LLM span information
197
95
  * Multiple spans
@@ -200,22 +98,6 @@ export declare const RESOURCE_NAME_ATTRIBUTE = "resource.name";
200
98
  * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
201
99
  */
202
100
  export declare const AI_MODEL_ID_ATTRIBUTE = "ai.model.id";
203
- /**
204
- * Basic LLM span information
205
- * Multiple spans
206
- *
207
- * The provider of the model
208
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
209
- */
210
- export declare const AI_MODEL_PROVIDER_ATTRIBUTE = "ai.model.provider";
211
- /**
212
- * Basic LLM span information
213
- * Multiple spans
214
- *
215
- * The request headers that were passed in through `headers`
216
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
217
- */
218
- export declare const AI_REQUEST_HEADERS_ATTRIBUTE = "ai.request.headers";
219
101
  /**
220
102
  * Basic LLM span information
221
103
  * Multiple spans
@@ -224,14 +106,6 @@ export declare const AI_REQUEST_HEADERS_ATTRIBUTE = "ai.request.headers";
224
106
  * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
225
107
  */
226
108
  export declare const AI_RESPONSE_PROVIDER_METADATA_ATTRIBUTE = "ai.response.providerMetadata";
227
- /**
228
- * Basic LLM span information
229
- * Multiple spans
230
- *
231
- * The maximum number of retries that were set
232
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
233
- */
234
- export declare const AI_SETTINGS_MAX_RETRIES_ATTRIBUTE = "ai.settings.maxRetries";
235
109
  /**
236
110
  * Basic LLM span information
237
111
  * Multiple spans
@@ -248,14 +122,6 @@ export declare const AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE = "ai.usage.cachedIn
248
122
  * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
249
123
  */
250
124
  export declare const AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE = "ai.telemetry.functionId";
251
- /**
252
- * Basic LLM span information
253
- * Multiple spans
254
- *
255
- * The metadata that was passed in through `telemetry.metadata`
256
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
257
- */
258
- export declare const AI_TELEMETRY_METADATA_ATTRIBUTE = "ai.telemetry.metadata";
259
125
  /**
260
126
  * Basic LLM span information
261
127
  * Multiple spans
@@ -296,118 +162,6 @@ export declare const AI_RESPONSE_ID_ATTRIBUTE = "ai.response.id";
296
162
  * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
297
163
  */
298
164
  export declare const AI_RESPONSE_TIMESTAMP_ATTRIBUTE = "ai.response.timestamp";
299
- /**
300
- * Semantic Conventions for GenAI operations
301
- * Individual LLM call spans
302
- *
303
- * The provider that was used
304
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
305
- */
306
- export declare const GEN_AI_SYSTEM_ATTRIBUTE = "gen_ai.system";
307
- /**
308
- * Semantic Conventions for GenAI operations
309
- * Individual LLM call spans
310
- *
311
- * The model that was requested
312
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
313
- */
314
- export declare const GEN_AI_REQUEST_MODEL_ATTRIBUTE = "gen_ai.request.model";
315
- /**
316
- * Semantic Conventions for GenAI operations
317
- * Individual LLM call spans
318
- *
319
- * The temperature that was set
320
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
321
- */
322
- export declare const GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE = "gen_ai.request.temperature";
323
- /**
324
- * Semantic Conventions for GenAI operations
325
- * Individual LLM call spans
326
- *
327
- * The maximum number of tokens that were set
328
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
329
- */
330
- export declare const GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE = "gen_ai.request.max_tokens";
331
- /**
332
- * Semantic Conventions for GenAI operations
333
- * Individual LLM call spans
334
- *
335
- * The frequency penalty that was set
336
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
337
- */
338
- export declare const GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE = "gen_ai.request.frequency_penalty";
339
- /**
340
- * Semantic Conventions for GenAI operations
341
- * Individual LLM call spans
342
- *
343
- * The presence penalty that was set
344
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
345
- */
346
- export declare const GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE = "gen_ai.request.presence_penalty";
347
- /**
348
- * Semantic Conventions for GenAI operations
349
- * Individual LLM call spans
350
- *
351
- * The topK parameter value that was set
352
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
353
- */
354
- export declare const GEN_AI_REQUEST_TOP_K_ATTRIBUTE = "gen_ai.request.top_k";
355
- /**
356
- * Semantic Conventions for GenAI operations
357
- * Individual LLM call spans
358
- *
359
- * The topP parameter value that was set
360
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
361
- */
362
- export declare const GEN_AI_REQUEST_TOP_P_ATTRIBUTE = "gen_ai.request.top_p";
363
- /**
364
- * Semantic Conventions for GenAI operations
365
- * Individual LLM call spans
366
- *
367
- * The stop sequences
368
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
369
- */
370
- export declare const GEN_AI_REQUEST_STOP_SEQUENCES_ATTRIBUTE = "gen_ai.request.stop_sequences";
371
- /**
372
- * Semantic Conventions for GenAI operations
373
- * Individual LLM call spans
374
- *
375
- * The finish reasons that were returned by the provider
376
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
377
- */
378
- export declare const GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE = "gen_ai.response.finish_reasons";
379
- /**
380
- * Semantic Conventions for GenAI operations
381
- * Individual LLM call spans
382
- *
383
- * The model that was used to generate the response
384
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
385
- */
386
- export declare const GEN_AI_RESPONSE_MODEL_ATTRIBUTE = "gen_ai.response.model";
387
- /**
388
- * Semantic Conventions for GenAI operations
389
- * Individual LLM call spans
390
- *
391
- * The id of the response
392
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
393
- */
394
- export declare const GEN_AI_RESPONSE_ID_ATTRIBUTE = "gen_ai.response.id";
395
- /**
396
- * Semantic Conventions for GenAI operations
397
- * Individual LLM call spans
398
- *
399
- * The number of prompt tokens that were used
400
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
401
- */
402
- export declare const GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE = "gen_ai.usage.input_tokens";
403
- /**
404
- * Semantic Conventions for GenAI operations
405
- * Individual LLM call spans
406
- *
407
- * The number of completion tokens that were used
408
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
409
- */
410
- export declare const GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE = "gen_ai.usage.output_tokens";
411
165
  /**
412
166
  * Basic embedding span information
413
167
  * Embedding spans
@@ -448,240 +202,6 @@ export declare const AI_TOOL_CALL_ARGS_ATTRIBUTE = "ai.toolCall.args";
448
202
  * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans
449
203
  */
450
204
  export declare const AI_TOOL_CALL_RESULT_ATTRIBUTE = "ai.toolCall.result";
451
- /**
452
- * Attributes collected for `ai.generateText` span
453
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
454
- */
455
- export declare const AI_GENERATE_TEXT_SPAN_ATTRIBUTES: {
456
- readonly OPERATION_NAME: "operation.name";
457
- readonly AI_OPERATION_ID: "ai.operationId";
458
- readonly AI_PROMPT: "ai.prompt";
459
- readonly AI_RESPONSE_TEXT: "ai.response.text";
460
- readonly AI_RESPONSE_TOOL_CALLS: "ai.response.toolCalls";
461
- readonly AI_RESPONSE_FINISH_REASON: "ai.response.finishReason";
462
- readonly AI_SETTINGS_MAX_STEPS: "ai.settings.maxSteps";
463
- readonly RESOURCE_NAME: "resource.name";
464
- readonly AI_MODEL_ID: "ai.model.id";
465
- readonly AI_MODEL_PROVIDER: "ai.model.provider";
466
- readonly AI_REQUEST_HEADERS: "ai.request.headers";
467
- readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
468
- readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
469
- readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
470
- readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
471
- readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
472
- };
473
- /**
474
- * Attributes collected for `ai.generateText.doGenerate` span
475
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
476
- */
477
- export declare const AI_GENERATE_TEXT_DO_GENERATE_SPAN_ATTRIBUTES: {
478
- readonly OPERATION_NAME: "operation.name";
479
- readonly AI_OPERATION_ID: "ai.operationId";
480
- readonly AI_PROMPT_FORMAT: "ai.prompt.format";
481
- readonly AI_PROMPT_MESSAGES: "ai.prompt.messages";
482
- readonly AI_PROMPT_TOOLS: "ai.prompt.tools";
483
- readonly AI_PROMPT_TOOL_CHOICE: "ai.prompt.toolChoice";
484
- readonly RESOURCE_NAME: "resource.name";
485
- readonly AI_MODEL_ID: "ai.model.id";
486
- readonly AI_MODEL_PROVIDER: "ai.model.provider";
487
- readonly AI_REQUEST_HEADERS: "ai.request.headers";
488
- readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
489
- readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
490
- readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
491
- readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
492
- readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
493
- readonly AI_RESPONSE_MODEL: "ai.response.model";
494
- readonly AI_RESPONSE_ID: "ai.response.id";
495
- readonly AI_RESPONSE_TIMESTAMP: "ai.response.timestamp";
496
- readonly GEN_AI_SYSTEM: "gen_ai.system";
497
- readonly GEN_AI_REQUEST_MODEL: "gen_ai.request.model";
498
- readonly GEN_AI_REQUEST_TEMPERATURE: "gen_ai.request.temperature";
499
- readonly GEN_AI_REQUEST_MAX_TOKENS: "gen_ai.request.max_tokens";
500
- readonly GEN_AI_REQUEST_FREQUENCY_PENALTY: "gen_ai.request.frequency_penalty";
501
- readonly GEN_AI_REQUEST_PRESENCE_PENALTY: "gen_ai.request.presence_penalty";
502
- readonly GEN_AI_REQUEST_TOP_K: "gen_ai.request.top_k";
503
- readonly GEN_AI_REQUEST_TOP_P: "gen_ai.request.top_p";
504
- readonly GEN_AI_REQUEST_STOP_SEQUENCES: "gen_ai.request.stop_sequences";
505
- readonly GEN_AI_RESPONSE_FINISH_REASONS: "gen_ai.response.finish_reasons";
506
- readonly GEN_AI_RESPONSE_MODEL: "gen_ai.response.model";
507
- readonly GEN_AI_RESPONSE_ID: "gen_ai.response.id";
508
- readonly GEN_AI_USAGE_INPUT_TOKENS: "gen_ai.usage.input_tokens";
509
- readonly GEN_AI_USAGE_OUTPUT_TOKENS: "gen_ai.usage.output_tokens";
510
- };
511
- /**
512
- * Attributes collected for `ai.streamText` span
513
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamtext-function
514
- */
515
- export declare const AI_STREAM_TEXT_SPAN_ATTRIBUTES: {
516
- readonly OPERATION_NAME: "operation.name";
517
- readonly AI_OPERATION_ID: "ai.operationId";
518
- readonly AI_PROMPT: "ai.prompt";
519
- readonly RESOURCE_NAME: "resource.name";
520
- readonly AI_MODEL_ID: "ai.model.id";
521
- readonly AI_MODEL_PROVIDER: "ai.model.provider";
522
- readonly AI_REQUEST_HEADERS: "ai.request.headers";
523
- readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
524
- readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
525
- readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
526
- readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
527
- readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
528
- };
529
- /**
530
- * Attributes collected for `ai.streamText.doStream` span
531
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamtext-function
532
- */
533
- export declare const AI_STREAM_TEXT_DO_STREAM_SPAN_ATTRIBUTES: {
534
- readonly OPERATION_NAME: "operation.name";
535
- readonly AI_OPERATION_ID: "ai.operationId";
536
- readonly AI_RESPONSE_MS_TO_FIRST_CHUNK: "ai.response.msToFirstChunk";
537
- readonly AI_RESPONSE_MS_TO_FINISH: "ai.response.msToFinish";
538
- readonly AI_RESPONSE_AVG_COMPLETION_TOKENS_PER_SECOND: "ai.response.avgCompletionTokensPerSecond";
539
- readonly RESOURCE_NAME: "resource.name";
540
- readonly AI_MODEL_ID: "ai.model.id";
541
- readonly AI_MODEL_PROVIDER: "ai.model.provider";
542
- readonly AI_REQUEST_HEADERS: "ai.request.headers";
543
- readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
544
- readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
545
- readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
546
- readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
547
- readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
548
- readonly AI_RESPONSE_MODEL: "ai.response.model";
549
- readonly AI_RESPONSE_ID: "ai.response.id";
550
- readonly AI_RESPONSE_TIMESTAMP: "ai.response.timestamp";
551
- readonly GEN_AI_SYSTEM: "gen_ai.system";
552
- readonly GEN_AI_REQUEST_MODEL: "gen_ai.request.model";
553
- readonly GEN_AI_REQUEST_TEMPERATURE: "gen_ai.request.temperature";
554
- readonly GEN_AI_REQUEST_MAX_TOKENS: "gen_ai.request.max_tokens";
555
- readonly GEN_AI_REQUEST_FREQUENCY_PENALTY: "gen_ai.request.frequency_penalty";
556
- readonly GEN_AI_REQUEST_PRESENCE_PENALTY: "gen_ai.request.presence_penalty";
557
- readonly GEN_AI_REQUEST_TOP_K: "gen_ai.request.top_k";
558
- readonly GEN_AI_REQUEST_TOP_P: "gen_ai.request.top_p";
559
- readonly GEN_AI_REQUEST_STOP_SEQUENCES: "gen_ai.request.stop_sequences";
560
- readonly GEN_AI_RESPONSE_FINISH_REASONS: "gen_ai.response.finish_reasons";
561
- readonly GEN_AI_RESPONSE_MODEL: "gen_ai.response.model";
562
- readonly GEN_AI_RESPONSE_ID: "gen_ai.response.id";
563
- readonly GEN_AI_USAGE_INPUT_TOKENS: "gen_ai.usage.input_tokens";
564
- readonly GEN_AI_USAGE_OUTPUT_TOKENS: "gen_ai.usage.output_tokens";
565
- };
566
- /**
567
- * Attributes collected for `ai.generateObject` span
568
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function
569
- */
570
- export declare const AI_GENERATE_OBJECT_SPAN_ATTRIBUTES: {
571
- readonly OPERATION_NAME: "operation.name";
572
- readonly AI_OPERATION_ID: "ai.operationId";
573
- readonly AI_SCHEMA: "ai.schema";
574
- readonly AI_SCHEMA_NAME: "ai.schema.name";
575
- readonly AI_SCHEMA_DESCRIPTION: "ai.schema.description";
576
- readonly AI_RESPONSE_OBJECT: "ai.response.object";
577
- readonly AI_SETTINGS_MODE: "ai.settings.mode";
578
- readonly AI_SETTINGS_OUTPUT: "ai.settings.output";
579
- readonly RESOURCE_NAME: "resource.name";
580
- readonly AI_MODEL_ID: "ai.model.id";
581
- readonly AI_MODEL_PROVIDER: "ai.model.provider";
582
- readonly AI_REQUEST_HEADERS: "ai.request.headers";
583
- readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
584
- readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
585
- readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
586
- readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
587
- readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
588
- };
589
- /**
590
- * Attributes collected for `ai.streamObject` span
591
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function
592
- */
593
- export declare const AI_STREAM_OBJECT_SPAN_ATTRIBUTES: {
594
- readonly OPERATION_NAME: "operation.name";
595
- readonly AI_OPERATION_ID: "ai.operationId";
596
- readonly AI_SCHEMA: "ai.schema";
597
- readonly AI_SCHEMA_NAME: "ai.schema.name";
598
- readonly AI_SCHEMA_DESCRIPTION: "ai.schema.description";
599
- readonly AI_RESPONSE_OBJECT: "ai.response.object";
600
- readonly AI_SETTINGS_MODE: "ai.settings.mode";
601
- readonly AI_SETTINGS_OUTPUT: "ai.settings.output";
602
- readonly RESOURCE_NAME: "resource.name";
603
- readonly AI_MODEL_ID: "ai.model.id";
604
- readonly AI_MODEL_PROVIDER: "ai.model.provider";
605
- readonly AI_REQUEST_HEADERS: "ai.request.headers";
606
- readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
607
- readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
608
- readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
609
- readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
610
- readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
611
- };
612
- /**
613
- * Attributes collected for `ai.embed` span
614
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embed-function
615
- */
616
- export declare const AI_EMBED_SPAN_ATTRIBUTES: {
617
- readonly OPERATION_NAME: "operation.name";
618
- readonly AI_OPERATION_ID: "ai.operationId";
619
- readonly AI_VALUE: "ai.value";
620
- readonly AI_EMBEDDING: "ai.embedding";
621
- readonly RESOURCE_NAME: "resource.name";
622
- readonly AI_MODEL_ID: "ai.model.id";
623
- readonly AI_MODEL_PROVIDER: "ai.model.provider";
624
- readonly AI_REQUEST_HEADERS: "ai.request.headers";
625
- readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
626
- readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
627
- readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
628
- readonly AI_USAGE_TOKENS: "ai.usage.tokens";
629
- };
630
- /**
631
- * Attributes collected for `ai.embed.doEmbed` span
632
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embed-function
633
- */
634
- export declare const AI_EMBED_DO_EMBED_SPAN_ATTRIBUTES: {
635
- readonly OPERATION_NAME: "operation.name";
636
- readonly AI_OPERATION_ID: "ai.operationId";
637
- readonly AI_VALUES: "ai.values";
638
- readonly AI_EMBEDDINGS: "ai.embeddings";
639
- readonly RESOURCE_NAME: "resource.name";
640
- readonly AI_MODEL_ID: "ai.model.id";
641
- readonly AI_MODEL_PROVIDER: "ai.model.provider";
642
- readonly AI_REQUEST_HEADERS: "ai.request.headers";
643
- readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
644
- readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
645
- readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
646
- readonly AI_USAGE_TOKENS: "ai.usage.tokens";
647
- };
648
- /**
649
- * Attributes collected for `ai.embedMany` span
650
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embedmany-function
651
- */
652
- export declare const AI_EMBED_MANY_SPAN_ATTRIBUTES: {
653
- readonly OPERATION_NAME: "operation.name";
654
- readonly AI_OPERATION_ID: "ai.operationId";
655
- readonly AI_VALUES: "ai.values";
656
- readonly AI_EMBEDDINGS: "ai.embeddings";
657
- readonly RESOURCE_NAME: "resource.name";
658
- readonly AI_MODEL_ID: "ai.model.id";
659
- readonly AI_MODEL_PROVIDER: "ai.model.provider";
660
- readonly AI_REQUEST_HEADERS: "ai.request.headers";
661
- readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
662
- readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
663
- readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
664
- readonly AI_USAGE_TOKENS: "ai.usage.tokens";
665
- };
666
- /**
667
- * Attributes collected for `ai.toolCall` span
668
- * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans
669
- */
670
- export declare const AI_TOOL_CALL_SPAN_ATTRIBUTES: {
671
- readonly OPERATION_NAME: "operation.name";
672
- readonly AI_OPERATION_ID: "ai.operationId";
673
- readonly AI_TOOL_CALL_NAME: "ai.toolCall.name";
674
- readonly AI_TOOL_CALL_ID: "ai.toolCall.id";
675
- readonly AI_TOOL_CALL_ARGS: "ai.toolCall.args";
676
- readonly AI_TOOL_CALL_RESULT: "ai.toolCall.result";
677
- readonly RESOURCE_NAME: "resource.name";
678
- readonly AI_MODEL_ID: "ai.model.id";
679
- readonly AI_MODEL_PROVIDER: "ai.model.provider";
680
- readonly AI_REQUEST_HEADERS: "ai.request.headers";
681
- readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
682
- readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
683
- readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
684
- };
685
205
  /**
686
206
  * OpenAI Provider Metadata
687
207
  * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai
@@ -1,5 +1,5 @@
1
1
  import { DataCategory } from './datacategory';
2
- export type EventDropReason = 'before_send' | 'event_processor' | 'network_error' | 'queue_overflow' | 'ratelimit_backoff' | 'sample_rate' | 'send_error' | 'internal_sdk_error' | 'buffer_overflow' | 'ignored' | 'invalid';
2
+ export type EventDropReason = 'before_send' | 'event_processor' | 'network_error' | 'queue_overflow' | 'ratelimit_backoff' | 'sample_rate' | 'send_error' | 'internal_sdk_error' | 'buffer_overflow' | 'ignored' | 'invalid' | 'no_parent_span';
3
3
  export type Outcome = {
4
4
  reason: EventDropReason;
5
5
  category: DataCategory;
@@ -160,7 +160,7 @@ type StreamedSpanEnvelopeHeaders = BaseEnvelopeHeaders & {
160
160
  };
161
161
  type LogEnvelopeHeaders = BaseEnvelopeHeaders;
162
162
  type MetricEnvelopeHeaders = BaseEnvelopeHeaders;
163
- export type EventEnvelope = BaseEnvelope<EventEnvelopeHeaders, EventItem | AttachmentItem | UserFeedbackItem | FeedbackItem | ProfileItem>;
163
+ export type EventEnvelope = BaseEnvelope<EventEnvelopeHeaders, EventItem | AttachmentItem | UserFeedbackItem | FeedbackItem | ProfileItem | SpanContainerItem>;
164
164
  export type SessionEnvelope = BaseEnvelope<SessionEnvelopeHeaders, SessionItem>;
165
165
  export type ClientReportEnvelope = BaseEnvelope<ClientReportEnvelopeHeaders, ClientReportItem>;
166
166
  export type ReplayEnvelope = [
@@ -1,5 +1,6 @@
1
1
  import { Client } from '../client';
2
2
  import { Event, EventHint } from './event';
3
+ import { StreamedSpanJSON } from './span';
3
4
  /** Integration interface */
4
5
  export interface Integration {
5
6
  /**
@@ -43,6 +44,18 @@ export interface Integration {
43
44
  * This receives the client that the integration was installed for as third argument.
44
45
  */
45
46
  processEvent?(event: Event, hint: EventHint, client: Client): Event | null | PromiseLike<Event | null>;
47
+ /**
48
+ * An optional hook that allows modifications to a span. This hook runs after the span is ended,
49
+ * during `captureSpan` and before the span is passed to users' `beforeSendSpan` callback.
50
+ * Use this hook to modify a span in-place.
51
+ */
52
+ processSpan?(span: StreamedSpanJSON, client: Client): void;
53
+ /**
54
+ * An optional hook that allows modifications to a segment span. This hook runs after the segment span is ended,
55
+ * during `captureSpan` and before the segment span is passed to users' `beforeSendSpan` callback.
56
+ * Use this hook to modify a segment span in-place.
57
+ */
58
+ processSegmentSpan?(span: StreamedSpanJSON, client: Client): void;
46
59
  }
47
60
  /**
48
61
  * An integration in function form.
@@ -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
@@ -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
@@ -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
@@ -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