@sentry/node 9.26.0 → 9.28.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 (46) hide show
  1. package/build/cjs/index.js +2 -0
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/integrations/anr/index.js +1 -1
  4. package/build/cjs/integrations/local-variables/local-variables-async.js +1 -1
  5. package/build/cjs/integrations/tracing/vercelai/ai_sdk_attributes.js +128 -0
  6. package/build/cjs/integrations/tracing/vercelai/ai_sdk_attributes.js.map +1 -0
  7. package/build/cjs/integrations/tracing/vercelai/constants.js +6 -0
  8. package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -0
  9. package/build/cjs/integrations/tracing/vercelai/index.js +113 -89
  10. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  11. package/build/cjs/integrations/tracing/vercelai/instrumentation.js +56 -10
  12. package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  13. package/build/esm/index.js +1 -0
  14. package/build/esm/index.js.map +1 -1
  15. package/build/esm/integrations/anr/index.js +1 -1
  16. package/build/esm/integrations/anr/worker-script.js +2 -2
  17. package/build/esm/integrations/local-variables/local-variables-async.js +1 -1
  18. package/build/esm/integrations/local-variables/worker-script.js +2 -2
  19. package/build/esm/integrations/tracing/vercelai/ai_sdk_attributes.js +116 -0
  20. package/build/esm/integrations/tracing/vercelai/ai_sdk_attributes.js.map +1 -0
  21. package/build/esm/integrations/tracing/vercelai/constants.js +4 -0
  22. package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -0
  23. package/build/esm/integrations/tracing/vercelai/index.js +111 -87
  24. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  25. package/build/esm/integrations/tracing/vercelai/instrumentation.js +57 -12
  26. package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  27. package/build/esm/package.json +1 -1
  28. package/build/types/index.d.ts +1 -0
  29. package/build/types/index.d.ts.map +1 -1
  30. package/build/types/integrations/tracing/vercelai/ai_sdk_attributes.d.ts +669 -0
  31. package/build/types/integrations/tracing/vercelai/ai_sdk_attributes.d.ts.map +1 -0
  32. package/build/types/integrations/tracing/vercelai/constants.d.ts +2 -0
  33. package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -0
  34. package/build/types/integrations/tracing/vercelai/index.d.ts +2 -1
  35. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  36. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +18 -0
  37. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -1
  38. package/build/types/integrations/tracing/vercelai/types.d.ts +16 -0
  39. package/build/types/integrations/tracing/vercelai/types.d.ts.map +1 -1
  40. package/build/types-ts3.8/index.d.ts +1 -0
  41. package/build/types-ts3.8/integrations/tracing/vercelai/ai_sdk_attributes.d.ts +669 -0
  42. package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +2 -0
  43. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +2 -1
  44. package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +18 -0
  45. package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +16 -0
  46. package/package.json +3 -3
@@ -0,0 +1,669 @@
1
+ /**
2
+ * AI SDK Telemetry Attributes
3
+ * Based on https://ai-sdk.dev/docs/ai-sdk-core/telemetry#collected-data
4
+ */
5
+ /**
6
+ * Common attribute for operation name across all functions and spans
7
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#collected-data
8
+ */
9
+ export declare const OPERATION_NAME_ATTRIBUTE = "operation.name";
10
+ /**
11
+ * Common attribute for AI operation ID across all functions and spans
12
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#collected-data
13
+ */
14
+ export declare const AI_OPERATION_ID_ATTRIBUTE = "ai.operationId";
15
+ /**
16
+ * `generateText` function - `ai.generateText` span
17
+ * `streamText` function - `ai.streamText` span
18
+ *
19
+ * The prompt that was used when calling the function
20
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
21
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamtext-function
22
+ */
23
+ export declare const AI_PROMPT_ATTRIBUTE = "ai.prompt";
24
+ /**
25
+ * `generateObject` function - `ai.generateObject` span
26
+ * `streamObject` function - `ai.streamObject` span
27
+ *
28
+ * The JSON schema version of the schema that was passed into the function
29
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function
30
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function
31
+ */
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
+ /**
52
+ * `generateObject` function - `ai.generateObject` span
53
+ * `streamObject` function - `ai.streamObject` span
54
+ *
55
+ * The object that was generated (stringified JSON)
56
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function
57
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function
58
+ */
59
+ 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
+ /**
79
+ * `embed` function - `ai.embed.doEmbed` span
80
+ * `embedMany` function - `ai.embedMany` span
81
+ *
82
+ * The values that were passed into the function (array)
83
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embed-function
84
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embedmany-function
85
+ */
86
+ 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
+ /**
97
+ * `generateText` function - `ai.generateText` span
98
+ *
99
+ * The text that was generated
100
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
101
+ */
102
+ export declare const AI_RESPONSE_TEXT_ATTRIBUTE = "ai.response.text";
103
+ /**
104
+ * `generateText` function - `ai.generateText` span
105
+ *
106
+ * The tool calls that were made as part of the generation (stringified JSON)
107
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
108
+ */
109
+ export declare const AI_RESPONSE_TOOL_CALLS_ATTRIBUTE = "ai.response.toolCalls";
110
+ /**
111
+ * `generateText` function - `ai.generateText` span
112
+ *
113
+ * The reason why the generation finished
114
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
115
+ */
116
+ export declare const AI_RESPONSE_FINISH_REASON_ATTRIBUTE = "ai.response.finishReason";
117
+ /**
118
+ * `generateText` function - `ai.generateText` span
119
+ *
120
+ * The maximum number of steps that were set
121
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
122
+ */
123
+ 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
+ /**
132
+ * `generateText` function - `ai.generateText.doGenerate` span
133
+ *
134
+ * The messages that were passed into the provider
135
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
136
+ */
137
+ export declare const AI_PROMPT_MESSAGES_ATTRIBUTE = "ai.prompt.messages";
138
+ /**
139
+ * `generateText` function - `ai.generateText.doGenerate` span
140
+ *
141
+ * Array of stringified tool definitions
142
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
143
+ */
144
+ 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
+ /**
196
+ * Basic LLM span information
197
+ * Multiple spans
198
+ *
199
+ * The id of the model
200
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
201
+ */
202
+ 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
+ /**
220
+ * Basic LLM span information
221
+ * Multiple spans
222
+ *
223
+ * The maximum number of retries that were set
224
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
225
+ */
226
+ export declare const AI_SETTINGS_MAX_RETRIES_ATTRIBUTE = "ai.settings.maxRetries";
227
+ /**
228
+ * Basic LLM span information
229
+ * Multiple spans
230
+ *
231
+ * The functionId that was set through `telemetry.functionId`
232
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
233
+ */
234
+ export declare const AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE = "ai.telemetry.functionId";
235
+ /**
236
+ * Basic LLM span information
237
+ * Multiple spans
238
+ *
239
+ * The metadata that was passed in through `telemetry.metadata`
240
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
241
+ */
242
+ export declare const AI_TELEMETRY_METADATA_ATTRIBUTE = "ai.telemetry.metadata";
243
+ /**
244
+ * Basic LLM span information
245
+ * Multiple spans
246
+ *
247
+ * The number of completion tokens that were used
248
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
249
+ */
250
+ export declare const AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE = "ai.usage.completionTokens";
251
+ /**
252
+ * Basic LLM span information
253
+ * Multiple spans
254
+ *
255
+ * The number of prompt tokens that were used
256
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information
257
+ */
258
+ export declare const AI_USAGE_PROMPT_TOKENS_ATTRIBUTE = "ai.usage.promptTokens";
259
+ /**
260
+ * Call LLM span information
261
+ * Individual LLM call spans
262
+ *
263
+ * The model that was used to generate the response
264
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
265
+ */
266
+ export declare const AI_RESPONSE_MODEL_ATTRIBUTE = "ai.response.model";
267
+ /**
268
+ * Call LLM span information
269
+ * Individual LLM call spans
270
+ *
271
+ * The id of the response
272
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
273
+ */
274
+ export declare const AI_RESPONSE_ID_ATTRIBUTE = "ai.response.id";
275
+ /**
276
+ * Call LLM span information
277
+ * Individual LLM call spans
278
+ *
279
+ * The timestamp of the response
280
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
281
+ */
282
+ export declare const AI_RESPONSE_TIMESTAMP_ATTRIBUTE = "ai.response.timestamp";
283
+ /**
284
+ * Semantic Conventions for GenAI operations
285
+ * Individual LLM call spans
286
+ *
287
+ * The provider that was used
288
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
289
+ */
290
+ export declare const GEN_AI_SYSTEM_ATTRIBUTE = "gen_ai.system";
291
+ /**
292
+ * Semantic Conventions for GenAI operations
293
+ * Individual LLM call spans
294
+ *
295
+ * The model that was requested
296
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
297
+ */
298
+ export declare const GEN_AI_REQUEST_MODEL_ATTRIBUTE = "gen_ai.request.model";
299
+ /**
300
+ * Semantic Conventions for GenAI operations
301
+ * Individual LLM call spans
302
+ *
303
+ * The temperature that was set
304
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
305
+ */
306
+ export declare const GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE = "gen_ai.request.temperature";
307
+ /**
308
+ * Semantic Conventions for GenAI operations
309
+ * Individual LLM call spans
310
+ *
311
+ * The maximum number of tokens that were set
312
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
313
+ */
314
+ export declare const GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE = "gen_ai.request.max_tokens";
315
+ /**
316
+ * Semantic Conventions for GenAI operations
317
+ * Individual LLM call spans
318
+ *
319
+ * The frequency penalty 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_FREQUENCY_PENALTY_ATTRIBUTE = "gen_ai.request.frequency_penalty";
323
+ /**
324
+ * Semantic Conventions for GenAI operations
325
+ * Individual LLM call spans
326
+ *
327
+ * The presence penalty that was set
328
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
329
+ */
330
+ export declare const GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE = "gen_ai.request.presence_penalty";
331
+ /**
332
+ * Semantic Conventions for GenAI operations
333
+ * Individual LLM call spans
334
+ *
335
+ * The topK parameter value 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_TOP_K_ATTRIBUTE = "gen_ai.request.top_k";
339
+ /**
340
+ * Semantic Conventions for GenAI operations
341
+ * Individual LLM call spans
342
+ *
343
+ * The topP parameter value 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_TOP_P_ATTRIBUTE = "gen_ai.request.top_p";
347
+ /**
348
+ * Semantic Conventions for GenAI operations
349
+ * Individual LLM call spans
350
+ *
351
+ * The stop sequences
352
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
353
+ */
354
+ export declare const GEN_AI_REQUEST_STOP_SEQUENCES_ATTRIBUTE = "gen_ai.request.stop_sequences";
355
+ /**
356
+ * Semantic Conventions for GenAI operations
357
+ * Individual LLM call spans
358
+ *
359
+ * The finish reasons that were returned by the provider
360
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
361
+ */
362
+ export declare const GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE = "gen_ai.response.finish_reasons";
363
+ /**
364
+ * Semantic Conventions for GenAI operations
365
+ * Individual LLM call spans
366
+ *
367
+ * The model that was used to generate the response
368
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
369
+ */
370
+ export declare const GEN_AI_RESPONSE_MODEL_ATTRIBUTE = "gen_ai.response.model";
371
+ /**
372
+ * Semantic Conventions for GenAI operations
373
+ * Individual LLM call spans
374
+ *
375
+ * The id of the response
376
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
377
+ */
378
+ export declare const GEN_AI_RESPONSE_ID_ATTRIBUTE = "gen_ai.response.id";
379
+ /**
380
+ * Semantic Conventions for GenAI operations
381
+ * Individual LLM call spans
382
+ *
383
+ * The number of prompt tokens that were used
384
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
385
+ */
386
+ export declare const GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE = "gen_ai.usage.input_tokens";
387
+ /**
388
+ * Semantic Conventions for GenAI operations
389
+ * Individual LLM call spans
390
+ *
391
+ * The number of completion tokens that were used
392
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information
393
+ */
394
+ export declare const GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE = "gen_ai.usage.output_tokens";
395
+ /**
396
+ * Basic embedding span information
397
+ * Embedding spans
398
+ *
399
+ * The number of tokens that were used
400
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-embedding-span-information
401
+ */
402
+ export declare const AI_USAGE_TOKENS_ATTRIBUTE = "ai.usage.tokens";
403
+ /**
404
+ * Tool call spans
405
+ * `ai.toolCall` span
406
+ *
407
+ * The name of the tool
408
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans
409
+ */
410
+ export declare const AI_TOOL_CALL_NAME_ATTRIBUTE = "ai.toolCall.name";
411
+ /**
412
+ * Tool call spans
413
+ * `ai.toolCall` span
414
+ *
415
+ * The id of the tool call
416
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans
417
+ */
418
+ export declare const AI_TOOL_CALL_ID_ATTRIBUTE = "ai.toolCall.id";
419
+ /**
420
+ * Tool call spans
421
+ * `ai.toolCall` span
422
+ *
423
+ * The parameters of the tool call
424
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans
425
+ */
426
+ export declare const AI_TOOL_CALL_ARGS_ATTRIBUTE = "ai.toolCall.args";
427
+ /**
428
+ * Tool call spans
429
+ * `ai.toolCall` span
430
+ *
431
+ * The result of the tool call
432
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans
433
+ */
434
+ export declare const AI_TOOL_CALL_RESULT_ATTRIBUTE = "ai.toolCall.result";
435
+ /**
436
+ * Attributes collected for `ai.generateText` span
437
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
438
+ */
439
+ export declare const AI_GENERATE_TEXT_SPAN_ATTRIBUTES: {
440
+ readonly OPERATION_NAME: "operation.name";
441
+ readonly AI_OPERATION_ID: "ai.operationId";
442
+ readonly AI_PROMPT: "ai.prompt";
443
+ readonly AI_RESPONSE_TEXT: "ai.response.text";
444
+ readonly AI_RESPONSE_TOOL_CALLS: "ai.response.toolCalls";
445
+ readonly AI_RESPONSE_FINISH_REASON: "ai.response.finishReason";
446
+ readonly AI_SETTINGS_MAX_STEPS: "ai.settings.maxSteps";
447
+ readonly RESOURCE_NAME: "resource.name";
448
+ readonly AI_MODEL_ID: "ai.model.id";
449
+ readonly AI_MODEL_PROVIDER: "ai.model.provider";
450
+ readonly AI_REQUEST_HEADERS: "ai.request.headers";
451
+ readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
452
+ readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
453
+ readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
454
+ readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
455
+ readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
456
+ };
457
+ /**
458
+ * Attributes collected for `ai.generateText.doGenerate` span
459
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function
460
+ */
461
+ export declare const AI_GENERATE_TEXT_DO_GENERATE_SPAN_ATTRIBUTES: {
462
+ readonly OPERATION_NAME: "operation.name";
463
+ readonly AI_OPERATION_ID: "ai.operationId";
464
+ readonly AI_PROMPT_FORMAT: "ai.prompt.format";
465
+ readonly AI_PROMPT_MESSAGES: "ai.prompt.messages";
466
+ readonly AI_PROMPT_TOOLS: "ai.prompt.tools";
467
+ readonly AI_PROMPT_TOOL_CHOICE: "ai.prompt.toolChoice";
468
+ readonly RESOURCE_NAME: "resource.name";
469
+ readonly AI_MODEL_ID: "ai.model.id";
470
+ readonly AI_MODEL_PROVIDER: "ai.model.provider";
471
+ readonly AI_REQUEST_HEADERS: "ai.request.headers";
472
+ readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
473
+ readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
474
+ readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
475
+ readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
476
+ readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
477
+ readonly AI_RESPONSE_MODEL: "ai.response.model";
478
+ readonly AI_RESPONSE_ID: "ai.response.id";
479
+ readonly AI_RESPONSE_TIMESTAMP: "ai.response.timestamp";
480
+ readonly GEN_AI_SYSTEM: "gen_ai.system";
481
+ readonly GEN_AI_REQUEST_MODEL: "gen_ai.request.model";
482
+ readonly GEN_AI_REQUEST_TEMPERATURE: "gen_ai.request.temperature";
483
+ readonly GEN_AI_REQUEST_MAX_TOKENS: "gen_ai.request.max_tokens";
484
+ readonly GEN_AI_REQUEST_FREQUENCY_PENALTY: "gen_ai.request.frequency_penalty";
485
+ readonly GEN_AI_REQUEST_PRESENCE_PENALTY: "gen_ai.request.presence_penalty";
486
+ readonly GEN_AI_REQUEST_TOP_K: "gen_ai.request.top_k";
487
+ readonly GEN_AI_REQUEST_TOP_P: "gen_ai.request.top_p";
488
+ readonly GEN_AI_REQUEST_STOP_SEQUENCES: "gen_ai.request.stop_sequences";
489
+ readonly GEN_AI_RESPONSE_FINISH_REASONS: "gen_ai.response.finish_reasons";
490
+ readonly GEN_AI_RESPONSE_MODEL: "gen_ai.response.model";
491
+ readonly GEN_AI_RESPONSE_ID: "gen_ai.response.id";
492
+ readonly GEN_AI_USAGE_INPUT_TOKENS: "gen_ai.usage.input_tokens";
493
+ readonly GEN_AI_USAGE_OUTPUT_TOKENS: "gen_ai.usage.output_tokens";
494
+ };
495
+ /**
496
+ * Attributes collected for `ai.streamText` span
497
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamtext-function
498
+ */
499
+ export declare const AI_STREAM_TEXT_SPAN_ATTRIBUTES: {
500
+ readonly OPERATION_NAME: "operation.name";
501
+ readonly AI_OPERATION_ID: "ai.operationId";
502
+ readonly AI_PROMPT: "ai.prompt";
503
+ readonly RESOURCE_NAME: "resource.name";
504
+ readonly AI_MODEL_ID: "ai.model.id";
505
+ readonly AI_MODEL_PROVIDER: "ai.model.provider";
506
+ readonly AI_REQUEST_HEADERS: "ai.request.headers";
507
+ readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
508
+ readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
509
+ readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
510
+ readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
511
+ readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
512
+ };
513
+ /**
514
+ * Attributes collected for `ai.streamText.doStream` span
515
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamtext-function
516
+ */
517
+ export declare const AI_STREAM_TEXT_DO_STREAM_SPAN_ATTRIBUTES: {
518
+ readonly OPERATION_NAME: "operation.name";
519
+ readonly AI_OPERATION_ID: "ai.operationId";
520
+ readonly AI_RESPONSE_MS_TO_FIRST_CHUNK: "ai.response.msToFirstChunk";
521
+ readonly AI_RESPONSE_MS_TO_FINISH: "ai.response.msToFinish";
522
+ readonly AI_RESPONSE_AVG_COMPLETION_TOKENS_PER_SECOND: "ai.response.avgCompletionTokensPerSecond";
523
+ readonly RESOURCE_NAME: "resource.name";
524
+ readonly AI_MODEL_ID: "ai.model.id";
525
+ readonly AI_MODEL_PROVIDER: "ai.model.provider";
526
+ readonly AI_REQUEST_HEADERS: "ai.request.headers";
527
+ readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
528
+ readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
529
+ readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
530
+ readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
531
+ readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
532
+ readonly AI_RESPONSE_MODEL: "ai.response.model";
533
+ readonly AI_RESPONSE_ID: "ai.response.id";
534
+ readonly AI_RESPONSE_TIMESTAMP: "ai.response.timestamp";
535
+ readonly GEN_AI_SYSTEM: "gen_ai.system";
536
+ readonly GEN_AI_REQUEST_MODEL: "gen_ai.request.model";
537
+ readonly GEN_AI_REQUEST_TEMPERATURE: "gen_ai.request.temperature";
538
+ readonly GEN_AI_REQUEST_MAX_TOKENS: "gen_ai.request.max_tokens";
539
+ readonly GEN_AI_REQUEST_FREQUENCY_PENALTY: "gen_ai.request.frequency_penalty";
540
+ readonly GEN_AI_REQUEST_PRESENCE_PENALTY: "gen_ai.request.presence_penalty";
541
+ readonly GEN_AI_REQUEST_TOP_K: "gen_ai.request.top_k";
542
+ readonly GEN_AI_REQUEST_TOP_P: "gen_ai.request.top_p";
543
+ readonly GEN_AI_REQUEST_STOP_SEQUENCES: "gen_ai.request.stop_sequences";
544
+ readonly GEN_AI_RESPONSE_FINISH_REASONS: "gen_ai.response.finish_reasons";
545
+ readonly GEN_AI_RESPONSE_MODEL: "gen_ai.response.model";
546
+ readonly GEN_AI_RESPONSE_ID: "gen_ai.response.id";
547
+ readonly GEN_AI_USAGE_INPUT_TOKENS: "gen_ai.usage.input_tokens";
548
+ readonly GEN_AI_USAGE_OUTPUT_TOKENS: "gen_ai.usage.output_tokens";
549
+ };
550
+ /**
551
+ * Attributes collected for `ai.generateObject` span
552
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function
553
+ */
554
+ export declare const AI_GENERATE_OBJECT_SPAN_ATTRIBUTES: {
555
+ readonly OPERATION_NAME: "operation.name";
556
+ readonly AI_OPERATION_ID: "ai.operationId";
557
+ readonly AI_SCHEMA: "ai.schema";
558
+ readonly AI_SCHEMA_NAME: "ai.schema.name";
559
+ readonly AI_SCHEMA_DESCRIPTION: "ai.schema.description";
560
+ readonly AI_RESPONSE_OBJECT: "ai.response.object";
561
+ readonly AI_SETTINGS_MODE: "ai.settings.mode";
562
+ readonly AI_SETTINGS_OUTPUT: "ai.settings.output";
563
+ readonly RESOURCE_NAME: "resource.name";
564
+ readonly AI_MODEL_ID: "ai.model.id";
565
+ readonly AI_MODEL_PROVIDER: "ai.model.provider";
566
+ readonly AI_REQUEST_HEADERS: "ai.request.headers";
567
+ readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
568
+ readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
569
+ readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
570
+ readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
571
+ readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
572
+ };
573
+ /**
574
+ * Attributes collected for `ai.streamObject` span
575
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function
576
+ */
577
+ export declare const AI_STREAM_OBJECT_SPAN_ATTRIBUTES: {
578
+ readonly OPERATION_NAME: "operation.name";
579
+ readonly AI_OPERATION_ID: "ai.operationId";
580
+ readonly AI_SCHEMA: "ai.schema";
581
+ readonly AI_SCHEMA_NAME: "ai.schema.name";
582
+ readonly AI_SCHEMA_DESCRIPTION: "ai.schema.description";
583
+ readonly AI_RESPONSE_OBJECT: "ai.response.object";
584
+ readonly AI_SETTINGS_MODE: "ai.settings.mode";
585
+ readonly AI_SETTINGS_OUTPUT: "ai.settings.output";
586
+ readonly RESOURCE_NAME: "resource.name";
587
+ readonly AI_MODEL_ID: "ai.model.id";
588
+ readonly AI_MODEL_PROVIDER: "ai.model.provider";
589
+ readonly AI_REQUEST_HEADERS: "ai.request.headers";
590
+ readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
591
+ readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
592
+ readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
593
+ readonly AI_USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
594
+ readonly AI_USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
595
+ };
596
+ /**
597
+ * Attributes collected for `ai.embed` span
598
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embed-function
599
+ */
600
+ export declare const AI_EMBED_SPAN_ATTRIBUTES: {
601
+ readonly OPERATION_NAME: "operation.name";
602
+ readonly AI_OPERATION_ID: "ai.operationId";
603
+ readonly AI_VALUE: "ai.value";
604
+ readonly AI_EMBEDDING: "ai.embedding";
605
+ readonly RESOURCE_NAME: "resource.name";
606
+ readonly AI_MODEL_ID: "ai.model.id";
607
+ readonly AI_MODEL_PROVIDER: "ai.model.provider";
608
+ readonly AI_REQUEST_HEADERS: "ai.request.headers";
609
+ readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
610
+ readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
611
+ readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
612
+ readonly AI_USAGE_TOKENS: "ai.usage.tokens";
613
+ };
614
+ /**
615
+ * Attributes collected for `ai.embed.doEmbed` span
616
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embed-function
617
+ */
618
+ export declare const AI_EMBED_DO_EMBED_SPAN_ATTRIBUTES: {
619
+ readonly OPERATION_NAME: "operation.name";
620
+ readonly AI_OPERATION_ID: "ai.operationId";
621
+ readonly AI_VALUES: "ai.values";
622
+ readonly AI_EMBEDDINGS: "ai.embeddings";
623
+ readonly RESOURCE_NAME: "resource.name";
624
+ readonly AI_MODEL_ID: "ai.model.id";
625
+ readonly AI_MODEL_PROVIDER: "ai.model.provider";
626
+ readonly AI_REQUEST_HEADERS: "ai.request.headers";
627
+ readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
628
+ readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
629
+ readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
630
+ readonly AI_USAGE_TOKENS: "ai.usage.tokens";
631
+ };
632
+ /**
633
+ * Attributes collected for `ai.embedMany` span
634
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embedmany-function
635
+ */
636
+ export declare const AI_EMBED_MANY_SPAN_ATTRIBUTES: {
637
+ readonly OPERATION_NAME: "operation.name";
638
+ readonly AI_OPERATION_ID: "ai.operationId";
639
+ readonly AI_VALUES: "ai.values";
640
+ readonly AI_EMBEDDINGS: "ai.embeddings";
641
+ readonly RESOURCE_NAME: "resource.name";
642
+ readonly AI_MODEL_ID: "ai.model.id";
643
+ readonly AI_MODEL_PROVIDER: "ai.model.provider";
644
+ readonly AI_REQUEST_HEADERS: "ai.request.headers";
645
+ readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
646
+ readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
647
+ readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
648
+ readonly AI_USAGE_TOKENS: "ai.usage.tokens";
649
+ };
650
+ /**
651
+ * Attributes collected for `ai.toolCall` span
652
+ * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans
653
+ */
654
+ export declare const AI_TOOL_CALL_SPAN_ATTRIBUTES: {
655
+ readonly OPERATION_NAME: "operation.name";
656
+ readonly AI_OPERATION_ID: "ai.operationId";
657
+ readonly AI_TOOL_CALL_NAME: "ai.toolCall.name";
658
+ readonly AI_TOOL_CALL_ID: "ai.toolCall.id";
659
+ readonly AI_TOOL_CALL_ARGS: "ai.toolCall.args";
660
+ readonly AI_TOOL_CALL_RESULT: "ai.toolCall.result";
661
+ readonly RESOURCE_NAME: "resource.name";
662
+ readonly AI_MODEL_ID: "ai.model.id";
663
+ readonly AI_MODEL_PROVIDER: "ai.model.provider";
664
+ readonly AI_REQUEST_HEADERS: "ai.request.headers";
665
+ readonly AI_SETTINGS_MAX_RETRIES: "ai.settings.maxRetries";
666
+ readonly AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
667
+ readonly AI_TELEMETRY_METADATA: "ai.telemetry.metadata";
668
+ };
669
+ //# sourceMappingURL=ai_sdk_attributes.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const INTEGRATION_NAME = "VercelAI";
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -1,4 +1,5 @@
1
1
  import { SentryVercelAiInstrumentation } from './instrumentation';
2
+ import { VercelAiOptions } from './types';
2
3
  export declare const instrumentVercelAi: ((options?: unknown) => SentryVercelAiInstrumentation) & {
3
4
  id: string;
4
5
  };
@@ -37,5 +38,5 @@ export declare const instrumentVercelAi: ((options?: unknown) => SentryVercelAiI
37
38
  * experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },
38
39
  * });
39
40
  */
40
- export declare const vercelAIIntegration: () => import("@sentry/core").Integration;
41
+ export declare const vercelAIIntegration: (options?: VercelAiOptions | undefined) => import("@sentry/core").Integration;
41
42
  //# sourceMappingURL=index.d.ts.map