You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/gen-ai/aws-bedrock.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,6 +222,7 @@ populating this attribute.
222
222
|`execute_tool`| Execute a tool ||
223
223
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
225
226
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
Copy file name to clipboardExpand all lines: docs/gen-ai/azure-ai-inference.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -223,6 +223,7 @@ populating this attribute.
223
223
|`execute_tool`| Execute a tool ||
224
224
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
226
227
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
Copy file name to clipboardExpand all lines: docs/gen-ai/gen-ai-agent-spans.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,7 @@ Instrumentations SHOULD document the list of errors they report.
132
132
|`execute_tool`| Execute a tool ||
133
133
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
135
136
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
136
137
137
138
---
@@ -362,6 +363,7 @@ populating this attribute.
362
363
|`execute_tool`| Execute a tool ||
363
364
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
365
367
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
Copy file name to clipboardExpand all lines: docs/gen-ai/gen-ai-events.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,6 +203,7 @@ populating this attribute.
203
203
|`execute_tool`| Execute a tool ||
204
204
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
206
207
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
Copy file name to clipboardExpand all lines: docs/gen-ai/gen-ai-metrics.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,7 @@ applicable `aws.bedrock.*` attributes and are not expected to include
125
125
|`execute_tool`| Execute a tool ||
126
126
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
128
129
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
129
130
130
131
---
@@ -245,6 +246,7 @@ Instrumentations SHOULD document the list of errors they report.
245
246
|`execute_tool`| Execute a tool ||
246
247
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
248
250
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
249
251
250
252
---
@@ -363,6 +365,7 @@ Instrumentations SHOULD document the list of errors they report.
363
365
|`execute_tool`| Execute a tool ||
364
366
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
366
369
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
367
370
368
371
---
@@ -468,6 +471,7 @@ applicable `aws.bedrock.*` attributes and are not expected to include
468
471
|`execute_tool`| Execute a tool ||
469
472
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
471
475
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
472
476
473
477
---
@@ -572,6 +576,7 @@ applicable `aws.bedrock.*` attributes and are not expected to include
572
576
|`execute_tool`| Execute a tool ||
573
577
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
575
580
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
|`execute_tool`| Execute a tool ||
236
237
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
238
240
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
239
241
240
242
---
@@ -345,6 +347,78 @@ Instrumentations SHOULD document the list of errors they report.
345
347
|`execute_tool`| Execute a tool ||
346
348
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
351
+
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
352
+
353
+
<!-- markdownlint-restore -->
354
+
<!-- prettier-ignore-end -->
355
+
<!-- END AUTOGENERATED TEXT -->
356
+
<!-- endsemconv -->
357
+
358
+
### Retrievals
359
+
360
+
<!-- semconv span.gen_ai.retrieval.client -->
361
+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
362
+
<!-- see templates/registry/markdown/snippet.md.j2 -->
Describes GenAI Retrieval Span - where relevant information or context is stored in a vector database or search system to be passed to a language model at a later time.
370
+
The `gen_ai.operation.name` SHOULD be `retrieval`.
371
+
**Span name** SHOULD be `{gen_ai.operation.name} {gen_ai.request.model}`.
372
+
373
+
**Span kind** SHOULD be `CLIENT`.
374
+
375
+
**Span status** SHOULD follow the [Recording Errors](/docs/general/recording-errors.md) document.
|[`gen_ai.operation.name`](/docs/registry/attributes/gen-ai.md)| string | The name of the operation being performed. [1]|`chat`; `generate_content`; `text_completion`|`Required`||
380
+
|[`error.type`](/docs/registry/attributes/error.md)| string | Describes a class of error the operation ended with. [2]|`timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500`|`Conditionally Required` if the operation ended in an error ||
381
+
|[`gen_ai.request.model`](/docs/registry/attributes/gen-ai.md)| string | The name of the GenAI model a request is being made to. [3]|`gpt-4`|`Conditionally Required` If available. ||
382
+
|[`server.port`](/docs/registry/attributes/server.md)| int | GenAI server port. [4]|`80`; `8080`; `443`|`Conditionally Required` If `server.address` is set. ||
383
+
|[`gen_ai.retrieval.documents_retrieved`](/docs/registry/attributes/gen-ai.md)| int | The number of documents retrieved. |`5`; `10`|`Recommended`||
384
+
|[`gen_ai.retrieval.top_k`](/docs/registry/attributes/gen-ai.md)| int | The number of documents to retrieve. |`5`; `10`|`Recommended`||
385
+
|[`gen_ai.retrieval.type`](/docs/registry/attributes/gen-ai.md)| string | The type of retrieval being performed. |`similarity`; `hybrid`|`Recommended`||
386
+
|[`gen_ai.retrieval.vector_store`](/docs/registry/attributes/gen-ai.md)| string | The vector store being used for retrieval. |`faiss`; `pinecone`|`Recommended`||
387
+
|[`server.address`](/docs/registry/attributes/server.md)| string | GenAI server address. [5]|`example.com`; `10.1.2.80`; `/tmp/my.sock`|`Recommended`||
388
+
389
+
**[1]`gen_ai.operation.name`:** If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries SHOULD use applicable predefined value.
390
+
391
+
**[2]`error.type`:** The `error.type` SHOULD match the error code returned by the Generative AI provider or the client library,
392
+
the canonical name of exception that occurred, or another low-cardinality error identifier.
393
+
Instrumentations SHOULD document the list of errors they report.
394
+
395
+
**[3]`gen_ai.request.model`:** The name of the GenAI model a request is being made to. If the model is supplied by a vendor, then the value must be the exact name of the model requested. If the model is a fine-tuned custom model, the value should have a more specific name than the base model that's been fine-tuned.
396
+
397
+
**[4]`server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
398
+
399
+
**[5]`server.address`:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
400
+
401
+
---
402
+
403
+
`error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
404
+
405
+
| Value | Description | Stability |
406
+
|---|---|---|
407
+
|`_OTHER`| A fallback error value to be used when the instrumentation doesn't define a custom value. ||
408
+
409
+
---
410
+
411
+
`gen_ai.operation.name` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
412
+
413
+
| Value | Description | Stability |
414
+
|---|---|---|
415
+
|`chat`| Chat completion operation such as [OpenAI Chat API](https://platform.openai.com/docs/api-reference/chat)||
|`embeddings`| Embeddings operation such as [OpenAI Create embeddings API](https://platform.openai.com/docs/api-reference/embeddings/create)||
418
+
|`execute_tool`| Execute a tool ||
419
+
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
348
422
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
349
423
350
424
<!-- markdownlint-restore -->
@@ -435,6 +509,7 @@ deserialize it to an object. When recorded on spans, it MAY be recorded as a JSO
435
509
|`execute_tool`| Execute a tool ||
436
510
|`generate_content`| Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content)||
|`retrieval`| Retrieval operation such as [OpenAI Retrieval API](https://platform.openai.com/docs/guides/retrieval)||
438
513
|`text_completion`| Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions)||
0 commit comments