@proj-airi/trace-kit 0.0.0-stage → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +102 -2
- package/dist/clock-CewQJzn8.d.mts +545 -0
- package/dist/clock-hjTPEs21.mjs +212 -0
- package/dist/collector/index.d.mts +207 -0
- package/dist/collector/index.mjs +601 -0
- package/dist/conventions-DLiC8rkL.mjs +285 -0
- package/dist/index-DV04qeax.d.mts +49 -0
- package/dist/index.d.mts +782 -0
- package/dist/index.mjs +6 -0
- package/dist/keys-DD_VE8Fk.mjs +34 -0
- package/dist/profiles/agent.d.mts +70 -0
- package/dist/profiles/agent.mjs +295 -0
- package/dist/profiles/voice.d.mts +128 -0
- package/dist/profiles/voice.mjs +669 -0
- package/dist/projections/index.d.mts +3 -0
- package/dist/projections/index.mjs +1 -0
- package/dist/semconv-BOVWnou1.d.mts +832 -0
- package/dist/semconv.d.mts +2 -0
- package/dist/semconv.mjs +832 -0
- package/dist/series-ring-CaKfvyWQ.mjs +118 -0
- package/dist/series-ring-DCb7czkl.d.mts +49 -0
- package/dist/sink-BoftsA-W.mjs +501 -0
- package/dist/testing/index.d.mts +79 -0
- package/dist/testing/index.mjs +880 -0
- package/dist/timeline-B4Vc6qQf.mjs +766 -0
- package/dist/types-Fp54Yi6b.d.mts +319 -0
- package/dist/views/index.d.mts +97 -0
- package/dist/views/index.mjs +219 -0
- package/package.json +71 -3
package/dist/semconv.mjs
ADDED
|
@@ -0,0 +1,832 @@
|
|
|
1
|
+
//#region src/conventions/semconv.ts
|
|
2
|
+
/** The semantic-conventions-genai commit that these constants come from. */
|
|
3
|
+
const SEMCONV_GENAI_COMMIT = "e6658f14c9d9ea0760825f029cb82e7673f48fab";
|
|
4
|
+
/**
|
|
5
|
+
* Free-form description of the GenAI agent provided by the application.
|
|
6
|
+
* Stability: `development`.
|
|
7
|
+
*/
|
|
8
|
+
const ATTR_GEN_AI_AGENT_DESCRIPTION = "gen_ai.agent.description";
|
|
9
|
+
/**
|
|
10
|
+
* The unique and stable identifier of the GenAI hosted agent resource.
|
|
11
|
+
* Stability: `development`.
|
|
12
|
+
*/
|
|
13
|
+
const ATTR_GEN_AI_AGENT_ID = "gen_ai.agent.id";
|
|
14
|
+
/**
|
|
15
|
+
* Human-readable name of the GenAI agent or workflow provided by the application.
|
|
16
|
+
* Stability: `development`.
|
|
17
|
+
*/
|
|
18
|
+
const ATTR_GEN_AI_AGENT_NAME = "gen_ai.agent.name";
|
|
19
|
+
/**
|
|
20
|
+
* The version of the GenAI agent.
|
|
21
|
+
* Stability: `development`.
|
|
22
|
+
*/
|
|
23
|
+
const ATTR_GEN_AI_AGENT_VERSION = "gen_ai.agent.version";
|
|
24
|
+
/**
|
|
25
|
+
* Indicates whether the effective conversation context used for this operation is a compacted view of a prior conversation.
|
|
26
|
+
* Stability: `development`.
|
|
27
|
+
*/
|
|
28
|
+
const ATTR_GEN_AI_CONVERSATION_COMPACTED = "gen_ai.conversation.compacted";
|
|
29
|
+
/**
|
|
30
|
+
* The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation.
|
|
31
|
+
* Stability: `development`.
|
|
32
|
+
*/
|
|
33
|
+
const ATTR_GEN_AI_CONVERSATION_ID = "gen_ai.conversation.id";
|
|
34
|
+
/**
|
|
35
|
+
* The data source identifier.
|
|
36
|
+
* Stability: `development`.
|
|
37
|
+
*/
|
|
38
|
+
const ATTR_GEN_AI_DATA_SOURCE_ID = "gen_ai.data_source.id";
|
|
39
|
+
/**
|
|
40
|
+
* The number of dimensions the resulting output embeddings should have.
|
|
41
|
+
* Stability: `development`.
|
|
42
|
+
*/
|
|
43
|
+
const ATTR_GEN_AI_EMBEDDINGS_DIMENSION_COUNT = "gen_ai.embeddings.dimension.count";
|
|
44
|
+
/**
|
|
45
|
+
* A free-form explanation for the assigned score provided by the evaluator.
|
|
46
|
+
* Stability: `development`.
|
|
47
|
+
*/
|
|
48
|
+
const ATTR_GEN_AI_EVALUATION_EXPLANATION = "gen_ai.evaluation.explanation";
|
|
49
|
+
/**
|
|
50
|
+
* The name of the evaluation metric used for the GenAI response.
|
|
51
|
+
* Stability: `development`.
|
|
52
|
+
*/
|
|
53
|
+
const ATTR_GEN_AI_EVALUATION_NAME = "gen_ai.evaluation.name";
|
|
54
|
+
/**
|
|
55
|
+
* Human readable label for evaluation.
|
|
56
|
+
* Stability: `development`.
|
|
57
|
+
*/
|
|
58
|
+
const ATTR_GEN_AI_EVALUATION_SCORE_LABEL = "gen_ai.evaluation.score.label";
|
|
59
|
+
/**
|
|
60
|
+
* The evaluation score returned by the evaluator.
|
|
61
|
+
* Stability: `development`.
|
|
62
|
+
*/
|
|
63
|
+
const ATTR_GEN_AI_EVALUATION_SCORE_VALUE = "gen_ai.evaluation.score.value";
|
|
64
|
+
/**
|
|
65
|
+
* The chat history provided to the model as an input.
|
|
66
|
+
* Stability: `development`.
|
|
67
|
+
*/
|
|
68
|
+
const ATTR_GEN_AI_INPUT_MESSAGES = "gen_ai.input.messages";
|
|
69
|
+
/**
|
|
70
|
+
* An absolute URI identifying the input messages in external storage.
|
|
71
|
+
* Stability: `development`.
|
|
72
|
+
*/
|
|
73
|
+
const ATTR_GEN_AI_INPUT_MESSAGES_REF = "gen_ai.input.messages_ref";
|
|
74
|
+
/**
|
|
75
|
+
* The free-form description of the top-level Generative AI agent in the process.
|
|
76
|
+
* Stability: `development`.
|
|
77
|
+
*/
|
|
78
|
+
const ATTR_GEN_AI_MAIN_AGENT_DESCRIPTION = "gen_ai.main_agent.description";
|
|
79
|
+
/**
|
|
80
|
+
* The unique and stable identifier of the top-level Generative AI agent in the process
|
|
81
|
+
* Stability: `development`.
|
|
82
|
+
*/
|
|
83
|
+
const ATTR_GEN_AI_MAIN_AGENT_ID = "gen_ai.main_agent.id";
|
|
84
|
+
/**
|
|
85
|
+
* The human-readable name of the top-level Generative AI agent in the process.
|
|
86
|
+
* Stability: `development`.
|
|
87
|
+
*/
|
|
88
|
+
const ATTR_GEN_AI_MAIN_AGENT_NAME = "gen_ai.main_agent.name";
|
|
89
|
+
/**
|
|
90
|
+
* The search query used to retrieve memories.
|
|
91
|
+
* Stability: `development`.
|
|
92
|
+
*/
|
|
93
|
+
const ATTR_GEN_AI_MEMORY_QUERY_TEXT = "gen_ai.memory.query.text";
|
|
94
|
+
/**
|
|
95
|
+
* The number of memory records relevant to the operation.
|
|
96
|
+
* Stability: `development`.
|
|
97
|
+
*/
|
|
98
|
+
const ATTR_GEN_AI_MEMORY_RECORD_COUNT = "gen_ai.memory.record.count";
|
|
99
|
+
/**
|
|
100
|
+
* The unique identifier of the memory record.
|
|
101
|
+
* Stability: `development`.
|
|
102
|
+
*/
|
|
103
|
+
const ATTR_GEN_AI_MEMORY_RECORD_ID = "gen_ai.memory.record.id";
|
|
104
|
+
/**
|
|
105
|
+
* The memory records stored or retrieved in a memory operation.
|
|
106
|
+
* Stability: `development`.
|
|
107
|
+
*/
|
|
108
|
+
const ATTR_GEN_AI_MEMORY_RECORDS = "gen_ai.memory.records";
|
|
109
|
+
/**
|
|
110
|
+
* The unique identifier of the memory store.
|
|
111
|
+
* Stability: `development`.
|
|
112
|
+
*/
|
|
113
|
+
const ATTR_GEN_AI_MEMORY_STORE_ID = "gen_ai.memory.store.id";
|
|
114
|
+
/**
|
|
115
|
+
* The name of the operation being performed.
|
|
116
|
+
* Stability: `development`.
|
|
117
|
+
*/
|
|
118
|
+
const ATTR_GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
|
|
119
|
+
/**
|
|
120
|
+
* Chat completion operation such as [OpenAI Chat API](https://platform.openai.com/docs/api-reference/chat)
|
|
121
|
+
* Stability: `development`.
|
|
122
|
+
*/
|
|
123
|
+
const GEN_AI_OPERATION_NAME_VALUE_CHAT = "chat";
|
|
124
|
+
/**
|
|
125
|
+
* Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)
|
|
126
|
+
* Stability: `development`.
|
|
127
|
+
*/
|
|
128
|
+
const GEN_AI_OPERATION_NAME_VALUE_GENERATE_CONTENT = "generate_content";
|
|
129
|
+
/**
|
|
130
|
+
* Server-side model generation within a realtime, bidirectional streaming session such as [OpenAI Realtime](https://platform.openai.com/docs/guides/realtime) or [Gemini Live](https://ai.google.dev/gemini-api/docs/live).
|
|
131
|
+
* Stability: `development`.
|
|
132
|
+
*/
|
|
133
|
+
const GEN_AI_OPERATION_NAME_VALUE_REALTIME_INFERENCE = "realtime_inference";
|
|
134
|
+
/**
|
|
135
|
+
* Describes the process of recording user speech input.
|
|
136
|
+
* Stability: `development`.
|
|
137
|
+
*/
|
|
138
|
+
const GEN_AI_OPERATION_NAME_VALUE_USER_SPEECH = "user_speech";
|
|
139
|
+
/**
|
|
140
|
+
* Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)
|
|
141
|
+
* Stability: `development`.
|
|
142
|
+
*/
|
|
143
|
+
const GEN_AI_OPERATION_NAME_VALUE_TEXT_COMPLETION = "text_completion";
|
|
144
|
+
/**
|
|
145
|
+
* Embeddings operation such as [OpenAI Create embeddings API](https://platform.openai.com/docs/api-reference/embeddings/create)
|
|
146
|
+
* Stability: `development`.
|
|
147
|
+
*/
|
|
148
|
+
const GEN_AI_OPERATION_NAME_VALUE_EMBEDDINGS = "embeddings";
|
|
149
|
+
/**
|
|
150
|
+
* Execution of a retrieval pipeline that returns documents relevant to a query
|
|
151
|
+
* Stability: `development`.
|
|
152
|
+
*/
|
|
153
|
+
const GEN_AI_OPERATION_NAME_VALUE_RETRIEVAL = "retrieval";
|
|
154
|
+
/**
|
|
155
|
+
* Fetch a previously generated model response by its identifier, without performing inference, such as [OpenAI Get a model response](https://platform.openai.com/docs/api-reference/responses/get)
|
|
156
|
+
* Stability: `development`.
|
|
157
|
+
*/
|
|
158
|
+
const GEN_AI_OPERATION_NAME_VALUE_FETCH_RESPONSE = "fetch_response";
|
|
159
|
+
/**
|
|
160
|
+
* Create GenAI agent
|
|
161
|
+
* Stability: `development`.
|
|
162
|
+
*/
|
|
163
|
+
const GEN_AI_OPERATION_NAME_VALUE_CREATE_AGENT = "create_agent";
|
|
164
|
+
/**
|
|
165
|
+
* Invoke GenAI agent
|
|
166
|
+
* Stability: `development`.
|
|
167
|
+
*/
|
|
168
|
+
const GEN_AI_OPERATION_NAME_VALUE_INVOKE_AGENT = "invoke_agent";
|
|
169
|
+
/**
|
|
170
|
+
* Execute a tool
|
|
171
|
+
* Stability: `development`.
|
|
172
|
+
*/
|
|
173
|
+
const GEN_AI_OPERATION_NAME_VALUE_EXECUTE_TOOL = "execute_tool";
|
|
174
|
+
/**
|
|
175
|
+
* Invoke GenAI workflow
|
|
176
|
+
* Stability: `development`.
|
|
177
|
+
*/
|
|
178
|
+
const GEN_AI_OPERATION_NAME_VALUE_INVOKE_WORKFLOW = "invoke_workflow";
|
|
179
|
+
/**
|
|
180
|
+
* Invoke a framework runner that is not itself an agent or a workflow
|
|
181
|
+
* Stability: `development`.
|
|
182
|
+
*/
|
|
183
|
+
const GEN_AI_OPERATION_NAME_VALUE_INVOKE_RUNNER = "invoke_runner";
|
|
184
|
+
/**
|
|
185
|
+
* Agent planning or task decomposition phase
|
|
186
|
+
* Stability: `development`.
|
|
187
|
+
*/
|
|
188
|
+
const GEN_AI_OPERATION_NAME_VALUE_PLAN = "plan";
|
|
189
|
+
/**
|
|
190
|
+
* Search/query memories from a memory store
|
|
191
|
+
* Stability: `development`.
|
|
192
|
+
*/
|
|
193
|
+
const GEN_AI_OPERATION_NAME_VALUE_SEARCH_MEMORY = "search_memory";
|
|
194
|
+
/**
|
|
195
|
+
* Create new memory records
|
|
196
|
+
* Stability: `development`.
|
|
197
|
+
*/
|
|
198
|
+
const GEN_AI_OPERATION_NAME_VALUE_CREATE_MEMORY = "create_memory";
|
|
199
|
+
/**
|
|
200
|
+
* Update existing memory records
|
|
201
|
+
* Stability: `development`.
|
|
202
|
+
*/
|
|
203
|
+
const GEN_AI_OPERATION_NAME_VALUE_UPDATE_MEMORY = "update_memory";
|
|
204
|
+
/**
|
|
205
|
+
* Create or update memory records without the caller choosing which
|
|
206
|
+
* Stability: `development`.
|
|
207
|
+
*/
|
|
208
|
+
const GEN_AI_OPERATION_NAME_VALUE_UPSERT_MEMORY = "upsert_memory";
|
|
209
|
+
/**
|
|
210
|
+
* Delete memory records
|
|
211
|
+
* Stability: `development`.
|
|
212
|
+
*/
|
|
213
|
+
const GEN_AI_OPERATION_NAME_VALUE_DELETE_MEMORY = "delete_memory";
|
|
214
|
+
/**
|
|
215
|
+
* Create or initialize a memory store
|
|
216
|
+
* Stability: `development`.
|
|
217
|
+
*/
|
|
218
|
+
const GEN_AI_OPERATION_NAME_VALUE_CREATE_MEMORY_STORE = "create_memory_store";
|
|
219
|
+
/**
|
|
220
|
+
* Delete or deprovision a memory store
|
|
221
|
+
* Stability: `development`.
|
|
222
|
+
*/
|
|
223
|
+
const GEN_AI_OPERATION_NAME_VALUE_DELETE_MEMORY_STORE = "delete_memory_store";
|
|
224
|
+
/**
|
|
225
|
+
* Messages returned by the model where each message represents a specific model response (choice, candidate).
|
|
226
|
+
* Stability: `development`.
|
|
227
|
+
*/
|
|
228
|
+
const ATTR_GEN_AI_OUTPUT_MESSAGES = "gen_ai.output.messages";
|
|
229
|
+
/**
|
|
230
|
+
* An absolute URI identifying the output messages in external storage.
|
|
231
|
+
* Stability: `development`.
|
|
232
|
+
*/
|
|
233
|
+
const ATTR_GEN_AI_OUTPUT_MESSAGES_REF = "gen_ai.output.messages_ref";
|
|
234
|
+
/**
|
|
235
|
+
* Represents the content type requested by the client.
|
|
236
|
+
* Stability: `development`.
|
|
237
|
+
*/
|
|
238
|
+
const ATTR_GEN_AI_OUTPUT_TYPE = "gen_ai.output.type";
|
|
239
|
+
/**
|
|
240
|
+
* Plain text
|
|
241
|
+
* Stability: `development`.
|
|
242
|
+
*/
|
|
243
|
+
const GEN_AI_OUTPUT_TYPE_VALUE_TEXT = "text";
|
|
244
|
+
/**
|
|
245
|
+
* JSON object with known or unknown schema
|
|
246
|
+
* Stability: `development`.
|
|
247
|
+
*/
|
|
248
|
+
const GEN_AI_OUTPUT_TYPE_VALUE_JSON = "json";
|
|
249
|
+
/**
|
|
250
|
+
* Image
|
|
251
|
+
* Stability: `development`.
|
|
252
|
+
*/
|
|
253
|
+
const GEN_AI_OUTPUT_TYPE_VALUE_IMAGE = "image";
|
|
254
|
+
/**
|
|
255
|
+
* Speech
|
|
256
|
+
* Stability: `development`.
|
|
257
|
+
*/
|
|
258
|
+
const GEN_AI_OUTPUT_TYPE_VALUE_SPEECH = "speech";
|
|
259
|
+
/**
|
|
260
|
+
* The name of the prompt that uniquely identifies it.
|
|
261
|
+
* Stability: `development`.
|
|
262
|
+
*/
|
|
263
|
+
const ATTR_GEN_AI_PROMPT_NAME = "gen_ai.prompt.name";
|
|
264
|
+
/**
|
|
265
|
+
* The variables supplied to the prompt template, the `<key>` being the variable name, the value being the variable value.
|
|
266
|
+
* Stability: `development`.
|
|
267
|
+
*/
|
|
268
|
+
const ATTR_GEN_AI_PROMPT_VARIABLE = "gen_ai.prompt.variable";
|
|
269
|
+
/**
|
|
270
|
+
* The version of the prompt template used.
|
|
271
|
+
* Stability: `development`.
|
|
272
|
+
*/
|
|
273
|
+
const ATTR_GEN_AI_PROMPT_VERSION = "gen_ai.prompt.version";
|
|
274
|
+
/**
|
|
275
|
+
* The Generative AI provider as identified by the client or server instrumentation.
|
|
276
|
+
* Stability: `development`.
|
|
277
|
+
*/
|
|
278
|
+
const ATTR_GEN_AI_PROVIDER_NAME = "gen_ai.provider.name";
|
|
279
|
+
/**
|
|
280
|
+
* [OpenAI](https://openai.com/)
|
|
281
|
+
* Stability: `development`.
|
|
282
|
+
*/
|
|
283
|
+
const GEN_AI_PROVIDER_NAME_VALUE_OPENAI = "openai";
|
|
284
|
+
/**
|
|
285
|
+
* Any Google generative AI endpoint
|
|
286
|
+
* Stability: `development`.
|
|
287
|
+
*/
|
|
288
|
+
const GEN_AI_PROVIDER_NAME_VALUE_GCP_GEN_AI = "gcp.gen_ai";
|
|
289
|
+
/**
|
|
290
|
+
* [Vertex AI](https://cloud.google.com/vertex-ai)
|
|
291
|
+
* Stability: `development`.
|
|
292
|
+
*/
|
|
293
|
+
const GEN_AI_PROVIDER_NAME_VALUE_GCP_VERTEX_AI = "gcp.vertex_ai";
|
|
294
|
+
/**
|
|
295
|
+
* [Gemini](https://cloud.google.com/products/gemini)
|
|
296
|
+
* Stability: `development`.
|
|
297
|
+
*/
|
|
298
|
+
const GEN_AI_PROVIDER_NAME_VALUE_GCP_GEMINI = "gcp.gemini";
|
|
299
|
+
/**
|
|
300
|
+
* [Anthropic](https://www.anthropic.com/)
|
|
301
|
+
* Stability: `development`.
|
|
302
|
+
*/
|
|
303
|
+
const GEN_AI_PROVIDER_NAME_VALUE_ANTHROPIC = "anthropic";
|
|
304
|
+
/**
|
|
305
|
+
* [Cohere](https://cohere.com/)
|
|
306
|
+
* Stability: `development`.
|
|
307
|
+
*/
|
|
308
|
+
const GEN_AI_PROVIDER_NAME_VALUE_COHERE = "cohere";
|
|
309
|
+
/**
|
|
310
|
+
* Azure AI Inference
|
|
311
|
+
* Stability: `development`.
|
|
312
|
+
*/
|
|
313
|
+
const GEN_AI_PROVIDER_NAME_VALUE_AZURE_AI_INFERENCE = "azure.ai.inference";
|
|
314
|
+
/**
|
|
315
|
+
* [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/overview)
|
|
316
|
+
* Stability: `development`.
|
|
317
|
+
*/
|
|
318
|
+
const GEN_AI_PROVIDER_NAME_VALUE_AZURE_AI_OPENAI = "azure.ai.openai";
|
|
319
|
+
/**
|
|
320
|
+
* [IBM Watsonx AI](https://www.ibm.com/products/watsonx-ai)
|
|
321
|
+
* Stability: `development`.
|
|
322
|
+
*/
|
|
323
|
+
const GEN_AI_PROVIDER_NAME_VALUE_IBM_WATSONX_AI = "ibm.watsonx.ai";
|
|
324
|
+
/**
|
|
325
|
+
* [AWS Bedrock](https://aws.amazon.com/bedrock)
|
|
326
|
+
* Stability: `development`.
|
|
327
|
+
*/
|
|
328
|
+
const GEN_AI_PROVIDER_NAME_VALUE_AWS_BEDROCK = "aws.bedrock";
|
|
329
|
+
/**
|
|
330
|
+
* [Perplexity](https://www.perplexity.ai/)
|
|
331
|
+
* Stability: `development`.
|
|
332
|
+
*/
|
|
333
|
+
const GEN_AI_PROVIDER_NAME_VALUE_PERPLEXITY = "perplexity";
|
|
334
|
+
/**
|
|
335
|
+
* [xAI](https://x.ai/)
|
|
336
|
+
* Stability: `development`.
|
|
337
|
+
*/
|
|
338
|
+
const GEN_AI_PROVIDER_NAME_VALUE_X_AI = "x_ai";
|
|
339
|
+
/**
|
|
340
|
+
* [DeepSeek](https://www.deepseek.com/)
|
|
341
|
+
* Stability: `development`.
|
|
342
|
+
*/
|
|
343
|
+
const GEN_AI_PROVIDER_NAME_VALUE_DEEPSEEK = "deepseek";
|
|
344
|
+
/**
|
|
345
|
+
* [Groq](https://groq.com/)
|
|
346
|
+
* Stability: `development`.
|
|
347
|
+
*/
|
|
348
|
+
const GEN_AI_PROVIDER_NAME_VALUE_GROQ = "groq";
|
|
349
|
+
/**
|
|
350
|
+
* [Mistral](https://mistral.ai/)
|
|
351
|
+
* Stability: `development`.
|
|
352
|
+
*/
|
|
353
|
+
const GEN_AI_PROVIDER_NAME_VALUE_MISTRAL = "mistral";
|
|
354
|
+
/**
|
|
355
|
+
* [Moonshot AI](https://www.moonshot.ai/)
|
|
356
|
+
* Stability: `development`.
|
|
357
|
+
*/
|
|
358
|
+
const GEN_AI_PROVIDER_NAME_VALUE_MOONSHOT_AI = "moonshot_ai";
|
|
359
|
+
/**
|
|
360
|
+
* [Ollama](https://ollama.com/)
|
|
361
|
+
* Stability: `development`.
|
|
362
|
+
*/
|
|
363
|
+
const GEN_AI_PROVIDER_NAME_VALUE_OLLAMA = "ollama";
|
|
364
|
+
/**
|
|
365
|
+
* The unique identifier for a realtime, bidirectional streaming session.
|
|
366
|
+
* Stability: `development`.
|
|
367
|
+
*/
|
|
368
|
+
const ATTR_GEN_AI_REALTIME_SESSION_ID = "gen_ai.realtime_session.id";
|
|
369
|
+
/**
|
|
370
|
+
* The target number of candidate completions to return.
|
|
371
|
+
* Stability: `development`.
|
|
372
|
+
*/
|
|
373
|
+
const ATTR_GEN_AI_REQUEST_CHOICE_COUNT = "gen_ai.request.choice.count";
|
|
374
|
+
/**
|
|
375
|
+
* The encoding formats requested in an embeddings operation, if specified.
|
|
376
|
+
* Stability: `development`.
|
|
377
|
+
*/
|
|
378
|
+
const ATTR_GEN_AI_REQUEST_ENCODING_FORMATS = "gen_ai.request.encoding_formats";
|
|
379
|
+
/**
|
|
380
|
+
* The frequency penalty setting for the GenAI request.
|
|
381
|
+
* Stability: `development`.
|
|
382
|
+
*/
|
|
383
|
+
const ATTR_GEN_AI_REQUEST_FREQUENCY_PENALTY = "gen_ai.request.frequency_penalty";
|
|
384
|
+
/**
|
|
385
|
+
* The maximum number of tokens the model generates for a request.
|
|
386
|
+
* Stability: `development`.
|
|
387
|
+
*/
|
|
388
|
+
const ATTR_GEN_AI_REQUEST_MAX_TOKENS = "gen_ai.request.max_tokens";
|
|
389
|
+
/**
|
|
390
|
+
* The name of the GenAI model a request is being made to.
|
|
391
|
+
* Stability: `development`.
|
|
392
|
+
*/
|
|
393
|
+
const ATTR_GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
|
|
394
|
+
/**
|
|
395
|
+
* The presence penalty setting for the GenAI request.
|
|
396
|
+
* Stability: `development`.
|
|
397
|
+
*/
|
|
398
|
+
const ATTR_GEN_AI_REQUEST_PRESENCE_PENALTY = "gen_ai.request.presence_penalty";
|
|
399
|
+
/**
|
|
400
|
+
* The unique identifier of a previous response or interaction used to provide context for the current operation.
|
|
401
|
+
* Stability: `development`.
|
|
402
|
+
*/
|
|
403
|
+
const ATTR_GEN_AI_REQUEST_PREVIOUS_RESPONSE_ID = "gen_ai.request.previous_response.id";
|
|
404
|
+
/**
|
|
405
|
+
* The reasoning or thinking effort level requested for a GenAI model.
|
|
406
|
+
* Stability: `development`.
|
|
407
|
+
*/
|
|
408
|
+
const ATTR_GEN_AI_REQUEST_REASONING_LEVEL = "gen_ai.request.reasoning.level";
|
|
409
|
+
/**
|
|
410
|
+
* Requests with same seed value more likely to return same result.
|
|
411
|
+
* Stability: `development`.
|
|
412
|
+
*/
|
|
413
|
+
const ATTR_GEN_AI_REQUEST_SEED = "gen_ai.request.seed";
|
|
414
|
+
/**
|
|
415
|
+
* List of sequences that the model will use to stop generating further tokens.
|
|
416
|
+
* Stability: `development`.
|
|
417
|
+
*/
|
|
418
|
+
const ATTR_GEN_AI_REQUEST_STOP_SEQUENCES = "gen_ai.request.stop_sequences";
|
|
419
|
+
/**
|
|
420
|
+
* Indicates whether the GenAI request was made in streaming mode.
|
|
421
|
+
* Stability: `development`.
|
|
422
|
+
*/
|
|
423
|
+
const ATTR_GEN_AI_REQUEST_STREAM = "gen_ai.request.stream";
|
|
424
|
+
/**
|
|
425
|
+
* The cursor identifying the last streamed event already received, used to resume a streamed response from that position.
|
|
426
|
+
* Stability: `development`.
|
|
427
|
+
*/
|
|
428
|
+
const ATTR_GEN_AI_REQUEST_STREAM_CURSOR = "gen_ai.request.stream_cursor";
|
|
429
|
+
/**
|
|
430
|
+
* The temperature setting for the GenAI request.
|
|
431
|
+
* Stability: `development`.
|
|
432
|
+
*/
|
|
433
|
+
const ATTR_GEN_AI_REQUEST_TEMPERATURE = "gen_ai.request.temperature";
|
|
434
|
+
/**
|
|
435
|
+
* The top-K sampling setting for the GenAI request: restricts token generation at each step to the K most likely next tokens.
|
|
436
|
+
* Stability: `development`.
|
|
437
|
+
*/
|
|
438
|
+
const ATTR_GEN_AI_REQUEST_TOP_K = "gen_ai.request.top_k";
|
|
439
|
+
/**
|
|
440
|
+
* The top_p sampling setting for the GenAI request.
|
|
441
|
+
* Stability: `development`.
|
|
442
|
+
*/
|
|
443
|
+
const ATTR_GEN_AI_REQUEST_TOP_P = "gen_ai.request.top_p";
|
|
444
|
+
/**
|
|
445
|
+
* Array of reasons the model stopped generating tokens, corresponding to each generation received.
|
|
446
|
+
* Stability: `development`.
|
|
447
|
+
*/
|
|
448
|
+
const ATTR_GEN_AI_RESPONSE_FINISH_REASONS = "gen_ai.response.finish_reasons";
|
|
449
|
+
/**
|
|
450
|
+
* The unique identifier for the completion.
|
|
451
|
+
* Stability: `development`.
|
|
452
|
+
*/
|
|
453
|
+
const ATTR_GEN_AI_RESPONSE_ID = "gen_ai.response.id";
|
|
454
|
+
/**
|
|
455
|
+
* The name of the model that generated the response.
|
|
456
|
+
* Stability: `development`.
|
|
457
|
+
*/
|
|
458
|
+
const ATTR_GEN_AI_RESPONSE_MODEL = "gen_ai.response.model";
|
|
459
|
+
/**
|
|
460
|
+
* The lifecycle status of a generated response, as reported by the provider when the response is fetched or polled.
|
|
461
|
+
* Stability: `development`.
|
|
462
|
+
*/
|
|
463
|
+
const ATTR_GEN_AI_RESPONSE_STATUS = "gen_ai.response.status";
|
|
464
|
+
/**
|
|
465
|
+
* The response has been accepted by the provider but generation has not started yet.
|
|
466
|
+
* Stability: `development`.
|
|
467
|
+
*/
|
|
468
|
+
const GEN_AI_RESPONSE_STATUS_VALUE_QUEUED = "queued";
|
|
469
|
+
/**
|
|
470
|
+
* The response is still being generated, for example a background or streamed response that has not finished.
|
|
471
|
+
* Stability: `development`.
|
|
472
|
+
*/
|
|
473
|
+
const GEN_AI_RESPONSE_STATUS_VALUE_IN_PROGRESS = "in_progress";
|
|
474
|
+
/**
|
|
475
|
+
* The response finished generating successfully.
|
|
476
|
+
* Stability: `development`.
|
|
477
|
+
*/
|
|
478
|
+
const GEN_AI_RESPONSE_STATUS_VALUE_COMPLETED = "completed";
|
|
479
|
+
/**
|
|
480
|
+
* The response stopped before generation completed, for example because a token limit or content filter was reached.
|
|
481
|
+
* Stability: `development`.
|
|
482
|
+
*/
|
|
483
|
+
const GEN_AI_RESPONSE_STATUS_VALUE_INCOMPLETE = "incomplete";
|
|
484
|
+
/**
|
|
485
|
+
* The response generation failed with an error.
|
|
486
|
+
* Stability: `development`.
|
|
487
|
+
*/
|
|
488
|
+
const GEN_AI_RESPONSE_STATUS_VALUE_FAILED = "failed";
|
|
489
|
+
/**
|
|
490
|
+
* The response generation was cancelled before it completed.
|
|
491
|
+
* Stability: `development`.
|
|
492
|
+
*/
|
|
493
|
+
const GEN_AI_RESPONSE_STATUS_VALUE_CANCELLED = "cancelled";
|
|
494
|
+
/**
|
|
495
|
+
* Time from the start of a logical inference operation to the first chunk in its streaming response, in seconds.
|
|
496
|
+
* Stability: `development`.
|
|
497
|
+
*/
|
|
498
|
+
const ATTR_GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK = "gen_ai.response.time_to_first_chunk";
|
|
499
|
+
/**
|
|
500
|
+
* The documents retrieved.
|
|
501
|
+
* Stability: `development`.
|
|
502
|
+
*/
|
|
503
|
+
const ATTR_GEN_AI_RETRIEVAL_DOCUMENTS = "gen_ai.retrieval.documents";
|
|
504
|
+
/**
|
|
505
|
+
* The query text used for retrieval.
|
|
506
|
+
* Stability: `development`.
|
|
507
|
+
*/
|
|
508
|
+
const ATTR_GEN_AI_RETRIEVAL_QUERY_TEXT = "gen_ai.retrieval.query.text";
|
|
509
|
+
/**
|
|
510
|
+
* The maximum number of documents the retriever was asked to return for the query (also known as `k`, `limit`, or `max_num_results`).
|
|
511
|
+
* Stability: `development`.
|
|
512
|
+
*/
|
|
513
|
+
const ATTR_GEN_AI_RETRIEVAL_TOP_K = "gen_ai.retrieval.top_k";
|
|
514
|
+
/**
|
|
515
|
+
* The [description of the Agent Skill](https://agentskills.io/specification#skill-md-format).
|
|
516
|
+
* Stability: `development`.
|
|
517
|
+
*/
|
|
518
|
+
const ATTR_GEN_AI_SKILL_DESCRIPTION = "gen_ai.skill.description";
|
|
519
|
+
/**
|
|
520
|
+
* The name of the [Agent Skill](https://agentskills.io/specification#skill-md-format).
|
|
521
|
+
* Stability: `development`.
|
|
522
|
+
*/
|
|
523
|
+
const ATTR_GEN_AI_SKILL_NAME = "gen_ai.skill.name";
|
|
524
|
+
/**
|
|
525
|
+
* The skill-relative name of the resource (script, reference, or asset) being accessed or executed.
|
|
526
|
+
* Stability: `development`.
|
|
527
|
+
*/
|
|
528
|
+
const ATTR_GEN_AI_SKILL_RESOURCE_NAME = "gen_ai.skill.resource.name";
|
|
529
|
+
/**
|
|
530
|
+
* The source URI for loading the skill.
|
|
531
|
+
* Stability: `development`.
|
|
532
|
+
*/
|
|
533
|
+
const ATTR_GEN_AI_SKILL_SOURCE_URI = "gen_ai.skill.source.uri";
|
|
534
|
+
/**
|
|
535
|
+
* The system message or instructions provided to the GenAI model separately from the chat history.
|
|
536
|
+
* Stability: `development`.
|
|
537
|
+
*/
|
|
538
|
+
const ATTR_GEN_AI_SYSTEM_INSTRUCTIONS = "gen_ai.system_instructions";
|
|
539
|
+
/**
|
|
540
|
+
* An absolute URI identifying the system instructions in external storage.
|
|
541
|
+
* Stability: `development`.
|
|
542
|
+
*/
|
|
543
|
+
const ATTR_GEN_AI_SYSTEM_INSTRUCTIONS_REF = "gen_ai.system_instructions_ref";
|
|
544
|
+
/**
|
|
545
|
+
* The modality of the tokens being counted.
|
|
546
|
+
* Stability: `development`.
|
|
547
|
+
*/
|
|
548
|
+
const ATTR_GEN_AI_TOKEN_MODALITY = "gen_ai.token.modality";
|
|
549
|
+
/**
|
|
550
|
+
* Text tokens.
|
|
551
|
+
* Stability: `development`.
|
|
552
|
+
*/
|
|
553
|
+
const GEN_AI_TOKEN_MODALITY_VALUE_TEXT = "text";
|
|
554
|
+
/**
|
|
555
|
+
* Image tokens.
|
|
556
|
+
* Stability: `development`.
|
|
557
|
+
*/
|
|
558
|
+
const GEN_AI_TOKEN_MODALITY_VALUE_IMAGE = "image";
|
|
559
|
+
/**
|
|
560
|
+
* Audio tokens.
|
|
561
|
+
* Stability: `development`.
|
|
562
|
+
*/
|
|
563
|
+
const GEN_AI_TOKEN_MODALITY_VALUE_AUDIO = "audio";
|
|
564
|
+
/**
|
|
565
|
+
* The modality is not known.
|
|
566
|
+
* Stability: `development`.
|
|
567
|
+
*/
|
|
568
|
+
const GEN_AI_TOKEN_MODALITY_VALUE_UNKNOWN = "unknown";
|
|
569
|
+
/**
|
|
570
|
+
* Parameters passed to the tool call.
|
|
571
|
+
* Stability: `development`.
|
|
572
|
+
*/
|
|
573
|
+
const ATTR_GEN_AI_TOOL_CALL_ARGUMENTS = "gen_ai.tool.call.arguments";
|
|
574
|
+
/**
|
|
575
|
+
* The tool call identifier supplied by the model or provider.
|
|
576
|
+
* Stability: `development`.
|
|
577
|
+
*/
|
|
578
|
+
const ATTR_GEN_AI_TOOL_CALL_ID = "gen_ai.tool.call.id";
|
|
579
|
+
/**
|
|
580
|
+
* The result returned by the tool call (if any and if execution was successful).
|
|
581
|
+
* Stability: `development`.
|
|
582
|
+
*/
|
|
583
|
+
const ATTR_GEN_AI_TOOL_CALL_RESULT = "gen_ai.tool.call.result";
|
|
584
|
+
/**
|
|
585
|
+
* The list of tool definitions available to the GenAI agent or model.
|
|
586
|
+
* Stability: `development`.
|
|
587
|
+
*/
|
|
588
|
+
const ATTR_GEN_AI_TOOL_DEFINITIONS = "gen_ai.tool.definitions";
|
|
589
|
+
/**
|
|
590
|
+
* An absolute URI identifying the tool definitions in external storage.
|
|
591
|
+
* Stability: `development`.
|
|
592
|
+
*/
|
|
593
|
+
const ATTR_GEN_AI_TOOL_DEFINITIONS_REF = "gen_ai.tool.definitions_ref";
|
|
594
|
+
/**
|
|
595
|
+
* The tool description.
|
|
596
|
+
* Stability: `development`.
|
|
597
|
+
*/
|
|
598
|
+
const ATTR_GEN_AI_TOOL_DESCRIPTION = "gen_ai.tool.description";
|
|
599
|
+
/**
|
|
600
|
+
* Name of the tool utilized by the agent.
|
|
601
|
+
* Stability: `development`.
|
|
602
|
+
*/
|
|
603
|
+
const ATTR_GEN_AI_TOOL_NAME = "gen_ai.tool.name";
|
|
604
|
+
/**
|
|
605
|
+
* Type of the tool utilized by the agent
|
|
606
|
+
* Stability: `development`.
|
|
607
|
+
*/
|
|
608
|
+
const ATTR_GEN_AI_TOOL_TYPE = "gen_ai.tool.type";
|
|
609
|
+
/**
|
|
610
|
+
* Describes how control passes to the transfer target.
|
|
611
|
+
* Stability: `development`.
|
|
612
|
+
*/
|
|
613
|
+
const ATTR_GEN_AI_TRANSFER_MODE = "gen_ai.transfer.mode";
|
|
614
|
+
/**
|
|
615
|
+
* The initiator waits for the target to finish and then resumes execution.
|
|
616
|
+
* Stability: `development`.
|
|
617
|
+
*/
|
|
618
|
+
const GEN_AI_TRANSFER_MODE_VALUE_RETURN_TO_CALLER = "return_to_caller";
|
|
619
|
+
/**
|
|
620
|
+
* The initiator does not wait for the target to finish. The target takes control of the remaining work.
|
|
621
|
+
* Stability: `development`.
|
|
622
|
+
*/
|
|
623
|
+
const GEN_AI_TRANSFER_MODE_VALUE_PASS_CONTROL = "pass_control";
|
|
624
|
+
/**
|
|
625
|
+
* The human-readable name of the agent targeted by the transfer.
|
|
626
|
+
* Stability: `development`.
|
|
627
|
+
*/
|
|
628
|
+
const ATTR_GEN_AI_TRANSFER_TARGET_NAME = "gen_ai.transfer.target.name";
|
|
629
|
+
/**
|
|
630
|
+
* The number of audio input tokens served from a provider-managed cache.
|
|
631
|
+
* Stability: `development`.
|
|
632
|
+
*/
|
|
633
|
+
const ATTR_GEN_AI_USAGE_AUDIO_CACHE_READ_INPUT_TOKENS = "gen_ai.usage.audio.cache_read.input_tokens";
|
|
634
|
+
/**
|
|
635
|
+
* The number of audio input tokens.
|
|
636
|
+
* Stability: `development`.
|
|
637
|
+
*/
|
|
638
|
+
const ATTR_GEN_AI_USAGE_AUDIO_INPUT_TOKENS = "gen_ai.usage.audio.input_tokens";
|
|
639
|
+
/**
|
|
640
|
+
* The number of audio output tokens.
|
|
641
|
+
* Stability: `development`.
|
|
642
|
+
*/
|
|
643
|
+
const ATTR_GEN_AI_USAGE_AUDIO_OUTPUT_TOKENS = "gen_ai.usage.audio.output_tokens";
|
|
644
|
+
/**
|
|
645
|
+
* The number of input tokens served from a provider-managed cache.
|
|
646
|
+
* Stability: `development`.
|
|
647
|
+
*/
|
|
648
|
+
const ATTR_GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS = "gen_ai.usage.cache_read.input_tokens";
|
|
649
|
+
/**
|
|
650
|
+
* The number of input tokens written to a provider-managed cache.
|
|
651
|
+
* Stability: `development`.
|
|
652
|
+
*/
|
|
653
|
+
const ATTR_GEN_AI_USAGE_CACHE_WRITE_INPUT_TOKENS = "gen_ai.usage.cache_write.input_tokens";
|
|
654
|
+
/**
|
|
655
|
+
* The number of image input tokens served from a provider-managed cache.
|
|
656
|
+
* Stability: `development`.
|
|
657
|
+
*/
|
|
658
|
+
const ATTR_GEN_AI_USAGE_IMAGE_CACHE_READ_INPUT_TOKENS = "gen_ai.usage.image.cache_read.input_tokens";
|
|
659
|
+
/**
|
|
660
|
+
* The number of image input tokens.
|
|
661
|
+
* Stability: `development`.
|
|
662
|
+
*/
|
|
663
|
+
const ATTR_GEN_AI_USAGE_IMAGE_INPUT_TOKENS = "gen_ai.usage.image.input_tokens";
|
|
664
|
+
/**
|
|
665
|
+
* The number of image output tokens.
|
|
666
|
+
* Stability: `development`.
|
|
667
|
+
*/
|
|
668
|
+
const ATTR_GEN_AI_USAGE_IMAGE_OUTPUT_TOKENS = "gen_ai.usage.image.output_tokens";
|
|
669
|
+
/**
|
|
670
|
+
* The total number of input (prompt) tokens across all modalities.
|
|
671
|
+
* Stability: `development`.
|
|
672
|
+
*/
|
|
673
|
+
const ATTR_GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens";
|
|
674
|
+
/**
|
|
675
|
+
* The total number of output (completion) tokens across all modalities.
|
|
676
|
+
* Stability: `development`.
|
|
677
|
+
*/
|
|
678
|
+
const ATTR_GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens";
|
|
679
|
+
/**
|
|
680
|
+
* The number of output tokens used for reasoning (e.g. chain-of-thought, extended thinking).
|
|
681
|
+
* Stability: `development`.
|
|
682
|
+
*/
|
|
683
|
+
const ATTR_GEN_AI_USAGE_REASONING_OUTPUT_TOKENS = "gen_ai.usage.reasoning.output_tokens";
|
|
684
|
+
/**
|
|
685
|
+
* The number of text input tokens served from a provider-managed cache.
|
|
686
|
+
* Stability: `development`.
|
|
687
|
+
*/
|
|
688
|
+
const ATTR_GEN_AI_USAGE_TEXT_CACHE_READ_INPUT_TOKENS = "gen_ai.usage.text.cache_read.input_tokens";
|
|
689
|
+
/**
|
|
690
|
+
* The number of text input tokens.
|
|
691
|
+
* Stability: `development`.
|
|
692
|
+
*/
|
|
693
|
+
const ATTR_GEN_AI_USAGE_TEXT_INPUT_TOKENS = "gen_ai.usage.text.input_tokens";
|
|
694
|
+
/**
|
|
695
|
+
* The number of text output tokens.
|
|
696
|
+
* Stability: `development`.
|
|
697
|
+
*/
|
|
698
|
+
const ATTR_GEN_AI_USAGE_TEXT_OUTPUT_TOKENS = "gen_ai.usage.text.output_tokens";
|
|
699
|
+
/**
|
|
700
|
+
* GenAI client embeddings operation duration.
|
|
701
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
702
|
+
* Stability: `development`.
|
|
703
|
+
*/
|
|
704
|
+
const METRIC_GEN_AI_CLIENT_EMBEDDINGS_DURATION = "gen_ai.client.embeddings.duration";
|
|
705
|
+
/**
|
|
706
|
+
* The number of input tokens used per embeddings operation.
|
|
707
|
+
* Instrument: `histogram`. Unit: `{token}`.
|
|
708
|
+
* Stability: `development`.
|
|
709
|
+
*/
|
|
710
|
+
const METRIC_GEN_AI_CLIENT_EMBEDDINGS_OPERATION_INPUT_TOKENS = "gen_ai.client.embeddings.operation.input_tokens";
|
|
711
|
+
/**
|
|
712
|
+
* GenAI client inference operation duration.
|
|
713
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
714
|
+
* Stability: `development`.
|
|
715
|
+
*/
|
|
716
|
+
const METRIC_GEN_AI_CLIENT_INFERENCE_DURATION = "gen_ai.client.inference.duration";
|
|
717
|
+
/**
|
|
718
|
+
* The number of input (prompt) tokens used per inference operation.
|
|
719
|
+
* Instrument: `histogram`. Unit: `{token}`.
|
|
720
|
+
* Stability: `development`.
|
|
721
|
+
*/
|
|
722
|
+
const METRIC_GEN_AI_CLIENT_INFERENCE_OPERATION_INPUT_TOKENS = "gen_ai.client.inference.operation.input_tokens";
|
|
723
|
+
/**
|
|
724
|
+
* The number of output (completion) tokens used per inference operation.
|
|
725
|
+
* Instrument: `histogram`. Unit: `{token}`.
|
|
726
|
+
* Stability: `development`.
|
|
727
|
+
*/
|
|
728
|
+
const METRIC_GEN_AI_CLIENT_INFERENCE_OPERATION_OUTPUT_TOKENS = "gen_ai.client.inference.operation.output_tokens";
|
|
729
|
+
/**
|
|
730
|
+
* Time per output chunk, recorded for each chunk received after the first one, measured as the time elapsed from the end of the previous chunk to the end of the current chunk.
|
|
731
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
732
|
+
* Stability: `development`.
|
|
733
|
+
*/
|
|
734
|
+
const METRIC_GEN_AI_CLIENT_INFERENCE_TIME_PER_OUTPUT_CHUNK = "gen_ai.client.inference.time_per_output_chunk";
|
|
735
|
+
/**
|
|
736
|
+
* Time from the start of a logical inference operation to the first chunk in its streaming response.
|
|
737
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
738
|
+
* Stability: `development`.
|
|
739
|
+
*/
|
|
740
|
+
const METRIC_GEN_AI_CLIENT_INFERENCE_TIME_TO_FIRST_CHUNK = "gen_ai.client.inference.time_to_first_chunk";
|
|
741
|
+
/**
|
|
742
|
+
* The number of input tokens served from a provider-managed cache.
|
|
743
|
+
* Instrument: `counter`. Unit: `{token}`.
|
|
744
|
+
* Stability: `development`.
|
|
745
|
+
*/
|
|
746
|
+
const METRIC_GEN_AI_CLIENT_INFERENCE_USAGE_CACHE_READ_INPUT_TOKENS = "gen_ai.client.inference.usage.cache_read.input_tokens";
|
|
747
|
+
/**
|
|
748
|
+
* The number of input tokens written to a provider-managed cache.
|
|
749
|
+
* Instrument: `counter`. Unit: `{token}`.
|
|
750
|
+
* Stability: `development`.
|
|
751
|
+
*/
|
|
752
|
+
const METRIC_GEN_AI_CLIENT_INFERENCE_USAGE_CACHE_WRITE_INPUT_TOKENS = "gen_ai.client.inference.usage.cache_write.input_tokens";
|
|
753
|
+
/**
|
|
754
|
+
* The number of input (prompt) tokens used, including cached tokens.
|
|
755
|
+
* Instrument: `counter`. Unit: `{token}`.
|
|
756
|
+
* Stability: `development`.
|
|
757
|
+
*/
|
|
758
|
+
const METRIC_GEN_AI_CLIENT_INFERENCE_USAGE_INPUT_TOKENS = "gen_ai.client.inference.usage.input_tokens";
|
|
759
|
+
/**
|
|
760
|
+
* The number of output (completion) tokens used, including reasoning tokens.
|
|
761
|
+
* Instrument: `counter`. Unit: `{token}`.
|
|
762
|
+
* Stability: `development`.
|
|
763
|
+
*/
|
|
764
|
+
const METRIC_GEN_AI_CLIENT_INFERENCE_USAGE_OUTPUT_TOKENS = "gen_ai.client.inference.usage.output_tokens";
|
|
765
|
+
/**
|
|
766
|
+
* The number of output tokens used for reasoning (e.g. chain-of-thought, extended thinking).
|
|
767
|
+
* Instrument: `counter`. Unit: `{token}`.
|
|
768
|
+
* Stability: `development`.
|
|
769
|
+
*/
|
|
770
|
+
const METRIC_GEN_AI_CLIENT_INFERENCE_USAGE_REASONING_OUTPUT_TOKENS = "gen_ai.client.inference.usage.reasoning.output_tokens";
|
|
771
|
+
/**
|
|
772
|
+
* GenAI client invoke agent operation duration.
|
|
773
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
774
|
+
* Stability: `development`.
|
|
775
|
+
*/
|
|
776
|
+
const METRIC_GEN_AI_CLIENT_INVOKE_AGENT_DURATION = "gen_ai.client.invoke_agent.duration";
|
|
777
|
+
/**
|
|
778
|
+
* GenAI operation duration.
|
|
779
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
780
|
+
* Stability: `development`.
|
|
781
|
+
*/
|
|
782
|
+
const METRIC_GEN_AI_CLIENT_OPERATION_DURATION = "gen_ai.client.operation.duration";
|
|
783
|
+
/**
|
|
784
|
+
* The duration of a single tool execution.
|
|
785
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
786
|
+
* Stability: `development`.
|
|
787
|
+
*/
|
|
788
|
+
const METRIC_GEN_AI_EXECUTE_TOOL_DURATION = "gen_ai.execute_tool.duration";
|
|
789
|
+
/**
|
|
790
|
+
* The end-to-end duration of a single in-process agent, workflow, or framework entrypoint invocation, from the moment the invocation starts until it emits the last chunk of its final response or terminates with an error.
|
|
791
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
792
|
+
* Stability: `development`.
|
|
793
|
+
*/
|
|
794
|
+
const METRIC_GEN_AI_INVOKE_AGENT_DURATION = "gen_ai.invoke_agent.duration";
|
|
795
|
+
/**
|
|
796
|
+
* The number of inference (model) calls a GenAI agent, workflow, or framework entrypoint makes during a single invocation.
|
|
797
|
+
* Instrument: `histogram`. Unit: `{inference_call}`.
|
|
798
|
+
* Stability: `development`.
|
|
799
|
+
*/
|
|
800
|
+
const METRIC_GEN_AI_INVOKE_AGENT_INFERENCE_CALLS = "gen_ai.invoke_agent.inference_calls";
|
|
801
|
+
/**
|
|
802
|
+
* The number of tool calls a GenAI agent, workflow, or framework entrypoint makes during a single invocation.
|
|
803
|
+
* Instrument: `histogram`. Unit: `{tool_call}`.
|
|
804
|
+
* Stability: `development`.
|
|
805
|
+
*/
|
|
806
|
+
const METRIC_GEN_AI_INVOKE_AGENT_TOOL_CALLS = "gen_ai.invoke_agent.tool_calls";
|
|
807
|
+
/**
|
|
808
|
+
* The duration of a retrieval operation - an execution of a framework retrieval pipeline that returns documents relevant to a query.
|
|
809
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
810
|
+
* Stability: `development`.
|
|
811
|
+
*/
|
|
812
|
+
const METRIC_GEN_AI_RETRIEVAL_DURATION = "gen_ai.retrieval.duration";
|
|
813
|
+
/**
|
|
814
|
+
* Generative AI server request duration such as time-to-last byte or last output token.
|
|
815
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
816
|
+
* Stability: `development`.
|
|
817
|
+
*/
|
|
818
|
+
const METRIC_GEN_AI_SERVER_REQUEST_DURATION = "gen_ai.server.request.duration";
|
|
819
|
+
/**
|
|
820
|
+
* Time per output token generated after the first token for successful responses.
|
|
821
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
822
|
+
* Stability: `development`.
|
|
823
|
+
*/
|
|
824
|
+
const METRIC_GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN = "gen_ai.server.time_per_output_token";
|
|
825
|
+
/**
|
|
826
|
+
* Time to generate first token for successful responses.
|
|
827
|
+
* Instrument: `histogram`. Unit: `s`.
|
|
828
|
+
* Stability: `development`.
|
|
829
|
+
*/
|
|
830
|
+
const METRIC_GEN_AI_SERVER_TIME_TO_FIRST_TOKEN = "gen_ai.server.time_to_first_token";
|
|
831
|
+
//#endregion
|
|
832
|
+
export { ATTR_GEN_AI_AGENT_DESCRIPTION, ATTR_GEN_AI_AGENT_ID, ATTR_GEN_AI_AGENT_NAME, ATTR_GEN_AI_AGENT_VERSION, ATTR_GEN_AI_CONVERSATION_COMPACTED, ATTR_GEN_AI_CONVERSATION_ID, ATTR_GEN_AI_DATA_SOURCE_ID, ATTR_GEN_AI_EMBEDDINGS_DIMENSION_COUNT, ATTR_GEN_AI_EVALUATION_EXPLANATION, ATTR_GEN_AI_EVALUATION_NAME, ATTR_GEN_AI_EVALUATION_SCORE_LABEL, ATTR_GEN_AI_EVALUATION_SCORE_VALUE, ATTR_GEN_AI_INPUT_MESSAGES, ATTR_GEN_AI_INPUT_MESSAGES_REF, ATTR_GEN_AI_MAIN_AGENT_DESCRIPTION, ATTR_GEN_AI_MAIN_AGENT_ID, ATTR_GEN_AI_MAIN_AGENT_NAME, ATTR_GEN_AI_MEMORY_QUERY_TEXT, ATTR_GEN_AI_MEMORY_RECORDS, ATTR_GEN_AI_MEMORY_RECORD_COUNT, ATTR_GEN_AI_MEMORY_RECORD_ID, ATTR_GEN_AI_MEMORY_STORE_ID, ATTR_GEN_AI_OPERATION_NAME, ATTR_GEN_AI_OUTPUT_MESSAGES, ATTR_GEN_AI_OUTPUT_MESSAGES_REF, ATTR_GEN_AI_OUTPUT_TYPE, ATTR_GEN_AI_PROMPT_NAME, ATTR_GEN_AI_PROMPT_VARIABLE, ATTR_GEN_AI_PROMPT_VERSION, ATTR_GEN_AI_PROVIDER_NAME, ATTR_GEN_AI_REALTIME_SESSION_ID, ATTR_GEN_AI_REQUEST_CHOICE_COUNT, ATTR_GEN_AI_REQUEST_ENCODING_FORMATS, ATTR_GEN_AI_REQUEST_FREQUENCY_PENALTY, ATTR_GEN_AI_REQUEST_MAX_TOKENS, ATTR_GEN_AI_REQUEST_MODEL, ATTR_GEN_AI_REQUEST_PRESENCE_PENALTY, ATTR_GEN_AI_REQUEST_PREVIOUS_RESPONSE_ID, ATTR_GEN_AI_REQUEST_REASONING_LEVEL, ATTR_GEN_AI_REQUEST_SEED, ATTR_GEN_AI_REQUEST_STOP_SEQUENCES, ATTR_GEN_AI_REQUEST_STREAM, ATTR_GEN_AI_REQUEST_STREAM_CURSOR, ATTR_GEN_AI_REQUEST_TEMPERATURE, ATTR_GEN_AI_REQUEST_TOP_K, ATTR_GEN_AI_REQUEST_TOP_P, ATTR_GEN_AI_RESPONSE_FINISH_REASONS, ATTR_GEN_AI_RESPONSE_ID, ATTR_GEN_AI_RESPONSE_MODEL, ATTR_GEN_AI_RESPONSE_STATUS, ATTR_GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK, ATTR_GEN_AI_RETRIEVAL_DOCUMENTS, ATTR_GEN_AI_RETRIEVAL_QUERY_TEXT, ATTR_GEN_AI_RETRIEVAL_TOP_K, ATTR_GEN_AI_SKILL_DESCRIPTION, ATTR_GEN_AI_SKILL_NAME, ATTR_GEN_AI_SKILL_RESOURCE_NAME, ATTR_GEN_AI_SKILL_SOURCE_URI, ATTR_GEN_AI_SYSTEM_INSTRUCTIONS, ATTR_GEN_AI_SYSTEM_INSTRUCTIONS_REF, ATTR_GEN_AI_TOKEN_MODALITY, ATTR_GEN_AI_TOOL_CALL_ARGUMENTS, ATTR_GEN_AI_TOOL_CALL_ID, ATTR_GEN_AI_TOOL_CALL_RESULT, ATTR_GEN_AI_TOOL_DEFINITIONS, ATTR_GEN_AI_TOOL_DEFINITIONS_REF, ATTR_GEN_AI_TOOL_DESCRIPTION, ATTR_GEN_AI_TOOL_NAME, ATTR_GEN_AI_TOOL_TYPE, ATTR_GEN_AI_TRANSFER_MODE, ATTR_GEN_AI_TRANSFER_TARGET_NAME, ATTR_GEN_AI_USAGE_AUDIO_CACHE_READ_INPUT_TOKENS, ATTR_GEN_AI_USAGE_AUDIO_INPUT_TOKENS, ATTR_GEN_AI_USAGE_AUDIO_OUTPUT_TOKENS, ATTR_GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS, ATTR_GEN_AI_USAGE_CACHE_WRITE_INPUT_TOKENS, ATTR_GEN_AI_USAGE_IMAGE_CACHE_READ_INPUT_TOKENS, ATTR_GEN_AI_USAGE_IMAGE_INPUT_TOKENS, ATTR_GEN_AI_USAGE_IMAGE_OUTPUT_TOKENS, ATTR_GEN_AI_USAGE_INPUT_TOKENS, ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, ATTR_GEN_AI_USAGE_REASONING_OUTPUT_TOKENS, ATTR_GEN_AI_USAGE_TEXT_CACHE_READ_INPUT_TOKENS, ATTR_GEN_AI_USAGE_TEXT_INPUT_TOKENS, ATTR_GEN_AI_USAGE_TEXT_OUTPUT_TOKENS, GEN_AI_OPERATION_NAME_VALUE_CHAT, GEN_AI_OPERATION_NAME_VALUE_CREATE_AGENT, GEN_AI_OPERATION_NAME_VALUE_CREATE_MEMORY, GEN_AI_OPERATION_NAME_VALUE_CREATE_MEMORY_STORE, GEN_AI_OPERATION_NAME_VALUE_DELETE_MEMORY, GEN_AI_OPERATION_NAME_VALUE_DELETE_MEMORY_STORE, GEN_AI_OPERATION_NAME_VALUE_EMBEDDINGS, GEN_AI_OPERATION_NAME_VALUE_EXECUTE_TOOL, GEN_AI_OPERATION_NAME_VALUE_FETCH_RESPONSE, GEN_AI_OPERATION_NAME_VALUE_GENERATE_CONTENT, GEN_AI_OPERATION_NAME_VALUE_INVOKE_AGENT, GEN_AI_OPERATION_NAME_VALUE_INVOKE_RUNNER, GEN_AI_OPERATION_NAME_VALUE_INVOKE_WORKFLOW, GEN_AI_OPERATION_NAME_VALUE_PLAN, GEN_AI_OPERATION_NAME_VALUE_REALTIME_INFERENCE, GEN_AI_OPERATION_NAME_VALUE_RETRIEVAL, GEN_AI_OPERATION_NAME_VALUE_SEARCH_MEMORY, GEN_AI_OPERATION_NAME_VALUE_TEXT_COMPLETION, GEN_AI_OPERATION_NAME_VALUE_UPDATE_MEMORY, GEN_AI_OPERATION_NAME_VALUE_UPSERT_MEMORY, GEN_AI_OPERATION_NAME_VALUE_USER_SPEECH, GEN_AI_OUTPUT_TYPE_VALUE_IMAGE, GEN_AI_OUTPUT_TYPE_VALUE_JSON, GEN_AI_OUTPUT_TYPE_VALUE_SPEECH, GEN_AI_OUTPUT_TYPE_VALUE_TEXT, GEN_AI_PROVIDER_NAME_VALUE_ANTHROPIC, GEN_AI_PROVIDER_NAME_VALUE_AWS_BEDROCK, GEN_AI_PROVIDER_NAME_VALUE_AZURE_AI_INFERENCE, GEN_AI_PROVIDER_NAME_VALUE_AZURE_AI_OPENAI, GEN_AI_PROVIDER_NAME_VALUE_COHERE, GEN_AI_PROVIDER_NAME_VALUE_DEEPSEEK, GEN_AI_PROVIDER_NAME_VALUE_GCP_GEMINI, GEN_AI_PROVIDER_NAME_VALUE_GCP_GEN_AI, GEN_AI_PROVIDER_NAME_VALUE_GCP_VERTEX_AI, GEN_AI_PROVIDER_NAME_VALUE_GROQ, GEN_AI_PROVIDER_NAME_VALUE_IBM_WATSONX_AI, GEN_AI_PROVIDER_NAME_VALUE_MISTRAL, GEN_AI_PROVIDER_NAME_VALUE_MOONSHOT_AI, GEN_AI_PROVIDER_NAME_VALUE_OLLAMA, GEN_AI_PROVIDER_NAME_VALUE_OPENAI, GEN_AI_PROVIDER_NAME_VALUE_PERPLEXITY, GEN_AI_PROVIDER_NAME_VALUE_X_AI, GEN_AI_RESPONSE_STATUS_VALUE_CANCELLED, GEN_AI_RESPONSE_STATUS_VALUE_COMPLETED, GEN_AI_RESPONSE_STATUS_VALUE_FAILED, GEN_AI_RESPONSE_STATUS_VALUE_INCOMPLETE, GEN_AI_RESPONSE_STATUS_VALUE_IN_PROGRESS, GEN_AI_RESPONSE_STATUS_VALUE_QUEUED, GEN_AI_TOKEN_MODALITY_VALUE_AUDIO, GEN_AI_TOKEN_MODALITY_VALUE_IMAGE, GEN_AI_TOKEN_MODALITY_VALUE_TEXT, GEN_AI_TOKEN_MODALITY_VALUE_UNKNOWN, GEN_AI_TRANSFER_MODE_VALUE_PASS_CONTROL, GEN_AI_TRANSFER_MODE_VALUE_RETURN_TO_CALLER, METRIC_GEN_AI_CLIENT_EMBEDDINGS_DURATION, METRIC_GEN_AI_CLIENT_EMBEDDINGS_OPERATION_INPUT_TOKENS, METRIC_GEN_AI_CLIENT_INFERENCE_DURATION, METRIC_GEN_AI_CLIENT_INFERENCE_OPERATION_INPUT_TOKENS, METRIC_GEN_AI_CLIENT_INFERENCE_OPERATION_OUTPUT_TOKENS, METRIC_GEN_AI_CLIENT_INFERENCE_TIME_PER_OUTPUT_CHUNK, METRIC_GEN_AI_CLIENT_INFERENCE_TIME_TO_FIRST_CHUNK, METRIC_GEN_AI_CLIENT_INFERENCE_USAGE_CACHE_READ_INPUT_TOKENS, METRIC_GEN_AI_CLIENT_INFERENCE_USAGE_CACHE_WRITE_INPUT_TOKENS, METRIC_GEN_AI_CLIENT_INFERENCE_USAGE_INPUT_TOKENS, METRIC_GEN_AI_CLIENT_INFERENCE_USAGE_OUTPUT_TOKENS, METRIC_GEN_AI_CLIENT_INFERENCE_USAGE_REASONING_OUTPUT_TOKENS, METRIC_GEN_AI_CLIENT_INVOKE_AGENT_DURATION, METRIC_GEN_AI_CLIENT_OPERATION_DURATION, METRIC_GEN_AI_EXECUTE_TOOL_DURATION, METRIC_GEN_AI_INVOKE_AGENT_DURATION, METRIC_GEN_AI_INVOKE_AGENT_INFERENCE_CALLS, METRIC_GEN_AI_INVOKE_AGENT_TOOL_CALLS, METRIC_GEN_AI_RETRIEVAL_DURATION, METRIC_GEN_AI_SERVER_REQUEST_DURATION, METRIC_GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN, METRIC_GEN_AI_SERVER_TIME_TO_FIRST_TOKEN, SEMCONV_GENAI_COMMIT };
|