Skip to content

Commit

Permalink
Add gen_ai.openai.response.system_fingerprint
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx committed Oct 30, 2024
1 parent 2fcfc66 commit 48d2589
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
5 changes: 3 additions & 2 deletions docs/attributes-registry/gen-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ Thie group defines attributes for OpenAI.
|---|---|---|---|---|
| <a id="gen-ai-openai-request-response-format" href="#gen-ai-openai-request-response-format">`gen_ai.openai.request.response_format`</a> | string | The response format that is requested. | `json` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="gen-ai-openai-request-seed" href="#gen-ai-openai-request-seed">`gen_ai.openai.request.seed`</a> | int | Requests with same seed value more likely to return same result. | `100` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="gen-ai-openai-request-service-tier" href="#gen-ai-openai-request-service-tier">`gen_ai.openai.request.service_tier`</a> | string | The service tier requested. May be a specific tier, detault, or auto. | `auto`; `default` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="gen-ai-openai-response-service-tier" href="#gen-ai-openai-response-service-tier">`gen_ai.openai.response.service_tier`</a> | string | The service tier used for the response. | `scale`; `detault` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="gen-ai-openai-request-service-tier" href="#gen-ai-openai-request-service-tier">`gen_ai.openai.request.service_tier`</a> | string | The service tier requested. May be a specific tier, default, or auto. | `auto`; `default` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="gen-ai-openai-response-service-tier" href="#gen-ai-openai-response-service-tier">`gen_ai.openai.response.service_tier`</a> | string | The service tier used for the response. | `scale`; `default` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="gen-ai-openai-response-system-fingerprint" href="#gen-ai-openai-response-system-fingerprint">`gen_ai.openai.response.system_fingerprint`</a> | string | A fingerprint to track any eventual change in the Generative AI environment. | `fp_44709d6fcb` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`gen_ai.openai.request.response_format` 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.

Expand Down
1 change: 1 addition & 0 deletions docs/gen-ai/openai.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ attributes and ones specific the OpenAI.
| [`gen_ai.openai.request.seed`](/docs/attributes-registry/gen-ai.md) | int | Requests with same seed value more likely to return same result. | `100` | `Conditionally Required` if the request includes a seed | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`gen_ai.openai.request.service_tier`](/docs/attributes-registry/gen-ai.md) | string | The service tier requested. May be a specific tier, detault, or auto. | `auto`; `default` | `Conditionally Required` [4] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`gen_ai.openai.response.service_tier`](/docs/attributes-registry/gen-ai.md) | string | The service tier used for the response. | `scale`; `detault` | `Conditionally Required` [5] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`gen_ai.openai.response.system_fingerprint`](/docs/attributes-registry/gen-ai.md) | string | A fingerprint to track any eventual change in the Generative AI environment. | `fp_44709d6fcb` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`server.port`](/docs/attributes-registry/server.md) | int | GenAI server port. [6] | `80`; `8080`; `443` | `Conditionally Required` If `server.address` is set. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`gen_ai.request.frequency_penalty`](/docs/attributes-registry/gen-ai.md) | double | The frequency penalty setting for the GenAI request. | `0.1` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`gen_ai.request.max_tokens`](/docs/attributes-registry/gen-ai.md) | int | The maximum number of tokens the model generates for a request. | `100` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
Expand Down
2 changes: 2 additions & 0 deletions model/gen-ai/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ groups:
attributes:
- ref: gen_ai.openai.response.service_tier
requirement_level: recommended
- ref: gen_ai.openai.response.system_fingerprint
requirement_level: recommended
- id: metric.gen_ai.client.token.usage
type: metric
metric_name: gen_ai.client.token.usage
Expand Down
9 changes: 7 additions & 2 deletions model/gen-ai/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,15 @@ groups:
value: "default"
brief: The system will utilize the default scale tier.
stability: experimental
brief: The service tier requested. May be a specific tier, detault, or auto.
brief: The service tier requested. May be a specific tier, default, or auto.
examples: ['auto', 'default']
- id: gen_ai.openai.response.service_tier
stability: experimental
type: string
brief: The service tier used for the response.
examples: ['scale', 'detault']
examples: ['scale', 'default']
- id: gen_ai.openai.response.system_fingerprint
stability: experimental
type: string
brief: A fingerprint to track any eventual change in the Generative AI environment.
examples: ["fp_44709d6fcb"]
2 changes: 2 additions & 0 deletions model/gen-ai/spans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ groups:
- ref: gen_ai.openai.response.service_tier
requirement_level:
conditionally_required: if the response was received and includes a service_tier
- ref: gen_ai.openai.response.system_fingerprint
requirement_level: recommended
- ref: gen_ai.usage.input_tokens
brief: The number of tokens used in the prompt sent to OpenAI.
- ref: gen_ai.usage.output_tokens
Expand Down

0 comments on commit 48d2589

Please sign in to comment.