Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenAI: Rename prompt and completion tokens attributes to input and output #1200

Merged
merged 6 commits into from
Jul 4, 2024

Conversation

lmolkova
Copy link
Contributor

@lmolkova lmolkova commented Jul 2, 2024

We're moved away from prompt/completion terminology on GenAI metrics to accommodate non-chat operations (like embeddings) - see #955 (comment) for the context.

But we didn't rename corresponding attributes on spans.

Changes

Rename:

  • gen_ai.usage.completion_tokens to gen_ai.usage.output_tokens
  • gen_ai.usage.prompt_tokens to gen_ai.usage.input_tokens

Merge requirement checklist

@lmolkova
Copy link
Contributor Author

lmolkova commented Jul 2, 2024

/cc @open-telemetry/semconv-llm-approvers

Copy link
Member

@drewby drewby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I just had one suggestion around making the descriptions consistent.

docs/attributes-registry/gen-ai.md Outdated Show resolved Hide resolved
@arminru arminru merged commit 5971366 into open-telemetry:main Jul 4, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

8 participants