File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
packages/instrumentation-aws-sdk/src Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -602,6 +602,14 @@ export const GEN_AI_TOKEN_TYPE_VALUE_INPUT = 'input' as const;
602602 */
603603export const GEN_AI_TOKEN_TYPE_VALUE_OUTPUT = 'output' as const ;
604604
605+ /**
606+ * GenAI operation duration.
607+ *
608+ * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
609+ */
610+ export const METRIC_GEN_AI_CLIENT_OPERATION_DURATION =
611+ 'gen_ai.client.operation.duration' as const ;
612+
605613/**
606614 * Number of input and output tokens used.
607615 *
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import {
4040 GEN_AI_SYSTEM_VALUE_AWS_BEDROCK ,
4141 GEN_AI_TOKEN_TYPE_VALUE_INPUT ,
4242 GEN_AI_TOKEN_TYPE_VALUE_OUTPUT ,
43+ METRIC_GEN_AI_CLIENT_OPERATION_DURATION ,
4344 METRIC_GEN_AI_CLIENT_TOKEN_USAGE ,
4445} from '../semconv' ;
4546import {
@@ -77,7 +78,7 @@ export class BedrockRuntimeServiceExtension implements ServiceExtension {
7778
7879 // https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-metrics/#metric-gen_aiclientoperationduration
7980 this . operationDuration = meter . createHistogram (
80- 'gen_ai.client.operation.duration' ,
81+ METRIC_GEN_AI_CLIENT_OPERATION_DURATION ,
8182 {
8283 unit : 's' ,
8384 description : 'GenAI operation duration' ,
You can’t perform that action at this time.
0 commit comments