Skip to content

feat(dogfood): promote the OTel GenAI semconv keys alongside the flat set - #679

Merged
jensholdgaard merged 2 commits into
mainfrom
dogfood-genai-semconv
Jul 29, 2026
Merged

feat(dogfood): promote the OTel GenAI semconv keys alongside the flat set#679
jensholdgaard merged 2 commits into
mainfrom
dogfood-genai-semconv

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

Extends the dogfood promotion set with the dotted OTel GenAI semconv keys — gen_ai.request.model, gen_ai.operation.name, gen_ai.provider.name (bare) and gen_ai.usage.{input,output}_tokens (typed i64) — alongside the existing flat Claude Code keys.

Proven live before this PR: the OTel Demo 3.0 agent, patched on a fork with opentelemetry-instrumentation-openai-v2 (VCR replay, no key, zero cost), emitted real gen_ai.client.inference.operation.details log events through the standard collector into this dogfood server. With these promotions active: event_name == "gen_ai.client.inference.operation.details" | count by attr.gen_ai.request.model, attr.gen_ai.operation.nameazure/gpt-5.5 / chat: 42, tenant-isolated from 13 other demo services that landed in their own tenants. Fork branch: jensholdgaard/opentelemetry-demogenai-log-events.

The two key families side by side are the two-sources story RFC 0037 anticipated: flat (Claude Code) + dotted (semconv-conformant sources). Usage-token sums light up whenever a source emits real usage (the VCR cassettes carry null usage).

Invariants / hazards

Config-only; promotion is a write-side projection (RFC 0022), applies to ingest after restart. Hazard #2 (cardinality): all five keys are low-cardinality by construction (models, operations, providers, token counts).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F

Summary by CodeRabbit

  • New Features
    • Added support for displaying additional OpenTelemetry GenAI metadata, including model, operation, provider, and input/output token usage details.

… set

The dotted gen_ai.* keys are what a semconv-conformant source emits on
its operation-details events — proven live against the OTel Demo 3.0
agent (patched with opentelemetry-instrumentation-openai-v2 under VCR
replay): count by attr.gen_ai.request.model / operation / provider
grouped 42 chat calls per model with the flat Claude Code keys promoted
side by side. The two families together are the two-sources story
RFC 0037 anticipated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F
Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>
@jensholdgaard
jensholdgaard requested a review from Copilot July 29, 2026 13:40
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b6017d85-a799-47a8-93a9-35271ce3b7d9

📥 Commits

Reviewing files that changed from the base of the PR and between 6e51cad and 64e8699.

📒 Files selected for processing (1)
  • dogfood-config.yaml
📝 Walkthrough

Walkthrough

Updates dogfood-config.yaml to promote OTel GenAI semantic convention attributes alongside existing Claude Code attributes, including model, operation, provider, and numeric token usage fields.

Changes

OTel GenAI attribute promotions

Layer / File(s) Summary
Promote OTel GenAI attributes
dogfood-config.yaml
Adds storage promotions for dotted GenAI model, operation, provider, input-token, and output-token attributes.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The summary is detailed, but the required Related and Checklist sections are missing from the template. Add the Related section and complete the Checklist items (fmt, clippy, tests, docs/changelog, RFC if applicable).
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding dotted OTel GenAI semconv promotions alongside the existing flat set.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dogfood-genai-semconv

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Extends the local dogfood server config’s promoted log-attribute set to include OpenTelemetry GenAI semantic-convention (dotted) keys alongside the existing flat Claude Code keys, enabling queries/aggregations over semconv-conformant sources in the same capture setup.

Changes:

  • Added string promotions for gen_ai.request.model, gen_ai.operation.name, and gen_ai.provider.name.
  • Added typed i64 promotions for gen_ai.usage.{input,output}_tokens.
  • Documented the “two-sources” rationale inline in the config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dogfood-config.yaml
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F
Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>
@jensholdgaard
jensholdgaard merged commit 54e3d35 into main Jul 29, 2026
27 checks passed
@jensholdgaard
jensholdgaard deleted the dogfood-genai-semconv branch July 29, 2026 13:54
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.

2 participants