fix: flatten OTEL cache attribute names for Sentry compatibility#3492
Conversation
Sentry's OTLP ingestion drops attributes with deeply nested dot notation (4+ segments). Flatten cache and reasoning token attribute names: - gen_ai.usage.cache_read.input_tokens → gen_ai.usage.cache_read_input_tokens - gen_ai.usage.cache_creation.input_tokens → gen_ai.usage.cache_creation_input_tokens - gen_ai.usage.reasoning.output_tokens → gen_ai.usage.reasoning_output_tokens The 3-segment names (gen_ai.usage.input_tokens, gen_ai.usage.output_tokens) continue to work fine. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7d88866 to
b78e7dc
Compare
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
Smoke Test Results✅ GitHub API: 2 PR entries confirmed in recent-prs.json PASS — All smoke tests passed.
|
🤖 Copilot Smoke Test Results
Overall: PASS Author: @lpcox
|
🔥 Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( PR by @lpcox · reviewer: Overall: PARTIAL — BYOK inference ✅, but smoke-data template variables were not expanded (workflow config issue).
|
|
GitHub PR review ✅ fix: flatten OTEL cache attribute names for Sentry compatibility; fix: align OTEL attributes with gen_ai semconv spec Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Smoke Test: API Proxy OpenTelemetry Tracing
All 5 scenarios passed. OTEL tracing integration is fully functional.
|
Chroot Version Comparison
Result: Not all tests passed — Python and Node.js versions differ between host and chroot.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results
Overall: FAIL — service containers unreachable via
|
Gemini Smoke Test Results - FAILWarning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
Sentry's OTLP ingestion drops span attributes with deeply nested dot notation (4+ segments). This flattens cache/reasoning attribute names so they appear in Sentry.
gen_ai.usage.cache_read.input_tokens→gen_ai.usage.cache_read_input_tokensgen_ai.usage.cache_creation.input_tokens→gen_ai.usage.cache_creation_input_tokensgen_ai.usage.reasoning.output_tokens→gen_ai.usage.reasoning_output_tokensTests: 32/32 pass