Gen ai.embeddings.dimension.count (#2362)
Co-authored-by: Liudmila Molkova <neskazu@gmail.com>
This commit is contained in:
parent
aec6e9d3e8
commit
fae5989eda
|
|
@ -0,0 +1,7 @@
|
|||
change_type: enhancement
|
||||
component: gen_ai
|
||||
note: Add `gen_ai.embeddings.dimension.count` attribute to capture the dimension count of embeddings.
|
||||
issues: [2361]
|
||||
subtext: |
|
||||
The `gen_ai.embeddings.dimension.count` is added to the `span.gen_ai.embeddings.client` span
|
||||
and `gen_ai.client.operation.duration` metric.
|
||||
|
|
@ -295,6 +295,7 @@ The `gen_ai.operation.name` SHOULD be `embeddings`.
|
|||
| [`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 |  |
|
||||
| [`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. |  |
|
||||
| [`server.port`](/docs/registry/attributes/server.md) | int | GenAI server port. [4] | `80`; `8080`; `443` | `Conditionally Required` If `server.address` is set. |  |
|
||||
| [`gen_ai.embeddings.dimension.count`](/docs/registry/attributes/gen-ai.md) | int | The number of dimensions the resulting output embeddings should have. | `512`; `1024` | `Recommended` |  |
|
||||
| [`gen_ai.request.encoding_formats`](/docs/registry/attributes/gen-ai.md) | string[] | The encoding formats requested in an embeddings operation, if specified. [5] | `["base64"]`; `["float", "binary"]` | `Recommended` |  |
|
||||
| [`gen_ai.usage.input_tokens`](/docs/registry/attributes/gen-ai.md) | int | The number of tokens used in the GenAI input (prompt). | `100` | `Recommended` |  |
|
||||
| [`server.address`](/docs/registry/attributes/server.md) | string | GenAI server address. [6] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | `Recommended` |  |
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ This document defines the attributes used to describe telemetry in the context o
|
|||
| <a id="gen-ai-agent-name" href="#gen-ai-agent-name">`gen_ai.agent.name`</a> | string | Human-readable name of the GenAI agent provided by the application. | `Math Tutor`; `Fiction Writer` |  |
|
||||
| <a id="gen-ai-conversation-id" href="#gen-ai-conversation-id">`gen_ai.conversation.id`</a> | string | The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation. | `conv_5j66UpCpwteGg4YSxUnt7lPY` |  |
|
||||
| <a id="gen-ai-data-source-id" href="#gen-ai-data-source-id">`gen_ai.data_source.id`</a> | string | The data source identifier. [1] | `H7STPQYOND` |  |
|
||||
| <a id="gen-ai-embeddings-dimension-count" href="#gen-ai-embeddings-dimension-count">`gen_ai.embeddings.dimension.count`</a> | int | The number of dimensions the resulting output embeddings should have. | `512`; `1024` |  |
|
||||
| <a id="gen-ai-input-messages" href="#gen-ai-input-messages">`gen_ai.input.messages`</a> | any | The chat history provided to the model as an input. [2] | [<br> {<br> "role": "user",<br> "parts": [<br> {<br> "type": "text",<br> "content": "Weather in Paris?"<br> }<br> ]<br> },<br> {<br> "role": "assistant",<br> "parts": [<br> {<br> "type": "tool_call",<br> "id": "call_VSPygqKTWdrhaFErNvMV18Yl",<br> "name": "get_weather",<br> "arguments": {<br> "location": "Paris"<br> }<br> }<br> ]<br> },<br> {<br> "role": "tool",<br> "parts": [<br> {<br> "type": "tool_call_response",<br> "id": " call_VSPygqKTWdrhaFErNvMV18Yl",<br> "result": "rainy, 57°F"<br> }<br> ]<br> }<br>] |  |
|
||||
| <a id="gen-ai-operation-name" href="#gen-ai-operation-name">`gen_ai.operation.name`</a> | string | The name of the operation being performed. [3] | `chat`; `generate_content`; `text_completion` |  |
|
||||
| <a id="gen-ai-output-messages" href="#gen-ai-output-messages">`gen_ai.output.messages`</a> | any | Messages returned by the model where each message represents a specific model response (choice, candidate). [4] | [<br> {<br> "role": "assistant",<br> "parts": [<br> {<br> "type": "text",<br> "content": "The weather in Paris is currently rainy with a temperature of 57°F."<br> }<br> ],<br> "finish_reason": "stop"<br> }<br>] |  |
|
||||
|
|
|
|||
|
|
@ -334,6 +334,11 @@ groups:
|
|||
|
||||
Additional output format details may be recorded in the future in the
|
||||
`gen_ai.output.{type}.*` attributes.
|
||||
- id: gen_ai.embeddings.dimension.count
|
||||
stability: development
|
||||
type: int
|
||||
brief: The number of dimensions the resulting output embeddings should have.
|
||||
examples: [512, 1024]
|
||||
- id: gen_ai.system_instructions
|
||||
stability: development
|
||||
type: any
|
||||
|
|
|
|||
|
|
@ -212,6 +212,8 @@ groups:
|
|||
requirement_level: recommended
|
||||
- ref: gen_ai.usage.input_tokens
|
||||
requirement_level: recommended
|
||||
- ref: gen_ai.embeddings.dimension.count
|
||||
requirement_level: recommended
|
||||
|
||||
- id: span.gen_ai.create_agent.client
|
||||
type: span
|
||||
|
|
|
|||
Loading…
Reference in New Issue