Skip to content

fix: emit gen_ai.usage.cache_write.input_tokens per the semconv rename - #69

Open
PabloPardoGarcia wants to merge 1 commit into
mainfrom
pablo/rius-661-cache-write-rename
Open

fix: emit gen_ai.usage.cache_write.input_tokens per the semconv rename#69
PabloPardoGarcia wants to merge 1 commit into
mainfrom
pablo/rius-661-cache-write-rename

Conversation

@PabloPardoGarcia

Copy link
Copy Markdown
Member

The GenAI semantic conventions renamed gen_ai.usage.cache_creation.input_tokens to gen_ai.usage.cache_write.input_tokens in semantic-conventions-genai#440 (merged 2026-08-20) — two weeks before our cache fields landed here in #65 with the pre-rename name.

The old name is in no released version (#65 merged after v0.12.0 was cut), so this is a clean pre-release correction: the set_usage parameter becomes cache_write_input_tokens, the emitted attribute becomes gen_ai.usage.cache_write.input_tokens, and no deprecated alias is carried.

Merge-order note: this should merge before the open release 0.13.0 PR, so 0.13.0 ships the conformant name and the old one never reaches PyPI. Companion TS PR renames setUsage's field the same way; the docs PR (#87 on glassflow-docs) is updated to match.

243 passed, ruff clean.

The GenAI conventions renamed cache_creation to cache_write
(open-telemetry/semantic-conventions-genai#440) before the cache fields
first shipped here; the old name is in no released version, so the
parameter and attribute rename land together with no alias.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant