Skip to content

docs(develop): Replace legacy ai.* span data with gen_ai.* conventions - #20820

Draft
sentry-junior[bot] wants to merge 1 commit into
masterfrom
docs/span-data-conventions-gen-ai
Draft

sentry-junior[bot] wants to merge 1 commit into
masterfrom
docs/span-data-conventions-gen-ai

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

A GenAI docs audit flagged two problems in the develop docs:

span-data-conventions.mdx: the AI section still listed the legacy ai.* attributes. Three of the token keys (ai.completion_tоkens.used, ai.prompt_tоkens.used, ai.total_tоkens.used) had a Cyrillic о in place of the Latin o, so anyone who copied them got a key that matches nothing.

  • I replaced the hand-written table with <ConventionAttributes>, which renders the gen_ai.* replacements straight from @sentry/conventions, so the types and descriptions can't drift from the source again.
  • I moved the legacy ai.* names, now in plain ASCII, to the Deprecated table, each mapped to the replacement that @sentry/conventions lists:
    • ai.input_messages → gen_ai.input.messages
    • ai.responses → gen_ai.output.messages
    • ai.model_id → gen_ai.request.model
    • ai.streaming → gen_ai.response.streaming
    • ai.prompt_tokens.used → gen_ai.usage.input_tokens
    • ai.completion_tokens.used → gen_ai.usage.output_tokens
    • ai.total_tokens.used → gen_ai.usage.total_tokens
  • I added a link to the AI Agents Module page for span ops and the attributes of each span type.

modules/ai-agents.mdx: both span-relationship trees used a gen_ai.memory op, which doesn't exist. The conventions define gen_ai.memory.client (GEN_AI_MEMORY_CLIENT), and the memory span spec and the Python and JS manual instrumentation pages already use it.

Verified locally: both pages return 200 on the developer-docs dev server, and every attribute key passed to <ConventionAttributes> exists in @sentry/conventions and is not deprecated.

IS YOUR CHANGE URGENT?

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

via Ogi.

--

View Session [Sentry]

Swap the AI table in span-data-conventions for ConventionAttributes
rendering the gen_ai.* replacements, and list the legacy ai.* names
under Deprecated. The old token keys contained Cyrillic о characters.

Also fix the AI Agents span trees, which used a nonexistent
gen_ai.memory op instead of gen_ai.memory.client.

Co-Authored-By: Ognjen Bostjancic <ognjen.bostjancic@sentry.io>
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
develop-docs Ready Ready Preview Nov 16, 2026 9:50am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-docs Ignored Ignored Nov 16, 2026 9:50am UTC

Request Review

@github-actions github-actions Bot added sdk-develop-docs PRs touching develop-docs/sdk Priority: Normal Docs review has no urgent deadline labels Nov 16, 2026
@obostjancic obostjancic self-assigned this Nov 16, 2026

This branch was successfully deployed

1 active deployment
Preview – develop-docs — cfc97c3b Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline sdk-develop-docs PRs touching develop-docs/sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant