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
The following metric instruments describe Generative AI operations. An
28
28
operation may be a request to an LLM, a function call, or some other
29
29
distinct action within a larger Generative AI workflow.
30
30
31
-
### Metric: `gen_ai.token.usage`
31
+
### Metric: `gen_ai.client.token.usage`
32
32
33
33
This metric is [recommended][MetricRecommended] when an operation involves the usage
34
34
of tokens and the count is readily available.
@@ -39,13 +39,13 @@ If instrumentation cannot efficiently obtain number of input and/or output token
39
39
40
40
This metric SHOULD be specified with [ExplicitBucketBoundaries] of [1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, 67108864].
|`gen_ai.token.usage`| Histogram |`{token}`| Measures number of input and output tokens used ||
45
+
|`gen_ai.client.token.usage`| Histogram |`{token}`| Measures number of input and output tokens used ||
|[`gen_ai.operation.name`](/docs/attributes-registry/gen-ai.md)| string | The name of the operation being performed. |`chat`; `completion`|`Required`||
@@ -87,19 +87,19 @@ Additional details may be captured in domain-specific attributes.
87
87
|`_OTHER`| A fallback error value to be used when the instrumentation doesn't define a custom value. ||
88
88
<!-- endsemconv -->
89
89
90
-
### Metric: `gen_ai.operation.duration`
90
+
### Metric: `gen_ai.client.operation.duration`
91
91
92
92
This metric is [required][MetricRequired].
93
93
94
94
This metric SHOULD be specified with [ExplicitBucketBoundaries] of [ 0.01, 0.02, 0.04, 0.08, 0.16, 0.32, 0.64, 1.28, 2.56, 5.12,10.24, 20.48, 40.96, 81.92].
|[`gen_ai.operation.name`](/docs/attributes-registry/gen-ai.md)| string | The name of the operation being performed. |`chat`; `completion`|`Required`||
0 commit comments