Skip to content

Commit 9b0629d

Browse files
Apply suggestions from code review
Co-authored-by: Daniel Szoke <[email protected]>
1 parent 9e98783 commit 9b0629d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sentry_sdk/ai/monitoring.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ def record_token_usage(
106106
if ai_pipeline_name:
107107
span.set_attribute("ai.pipeline.name", ai_pipeline_name)
108108
if prompt_tokens is not None:
109-
span.set_attribute("ai.prompt_tokens_used", prompt_tokens)
109+
span.set_attribute("ai.prompt_tokens.used", prompt_tokens)
110110
if completion_tokens is not None:
111-
span.set_attribute("ai.completion_tokens_used", completion_tokens)
111+
span.set_attribute("ai.completion_tokens.used", completion_tokens)
112112
if (
113113
total_tokens is None
114114
and prompt_tokens is not None
115115
and completion_tokens is not None
116116
):
117117
total_tokens = prompt_tokens + completion_tokens
118118
if total_tokens is not None:
119-
span.set_attribute("ai.total_tokens_used", total_tokens)
119+
span.set_attribute("ai.total_tokens.used", total_tokens)

0 commit comments

Comments
 (0)