File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
opentelemetry-instrumentation-anthropic/opentelemetry/instrumentation/anthropic
opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -283,11 +283,11 @@ async def _aset_token_usage(
283283 set_span_attribute (span , SpanAttributes .LLM_USAGE_TOTAL_TOKENS , total_tokens )
284284
285285 set_span_attribute (
286- span , GenAIAttributes .GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS , cache_read_tokens
286+ span , SpanAttributes .GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS , cache_read_tokens
287287 )
288288 set_span_attribute (
289289 span ,
290- GenAIAttributes .GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS ,
290+ SpanAttributes .GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS ,
291291 cache_creation_tokens ,
292292 )
293293
@@ -397,11 +397,11 @@ def _set_token_usage(
397397 set_span_attribute (span , SpanAttributes .LLM_USAGE_TOTAL_TOKENS , total_tokens )
398398
399399 set_span_attribute (
400- span , GenAIAttributes .GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS , cache_read_tokens
400+ span , SpanAttributes .GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS , cache_read_tokens
401401 )
402402 set_span_attribute (
403403 span ,
404- GenAIAttributes .GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS ,
404+ SpanAttributes .GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS ,
405405 cache_creation_tokens ,
406406 )
407407
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ def set_chat_response_usage(
346346 )
347347 _set_span_attribute (
348348 span ,
349- GenAIAttributes .GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS ,
349+ SpanAttributes .GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS ,
350350 cache_read_tokens ,
351351 )
352352 if record_token_usage :
You can’t perform that action at this time.
0 commit comments