refactor(telemetry)!: replace bespoke recorder with OTel Go SDK - #4510
Conversation
29322ea to
9ca290d
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
9ca290d to
36e2ef8
Compare
|
🤖 Finished Review · ✅ Success · Started 8:05 AM UTC · Completed 8:18 AM UTC |
ReviewRe-review (prior: FindingsHigh
Medium
Low
Previous runReviewRe-review (prior: FindingsHigh
Medium
Low
Previous run (2)ReviewRe-review (prior: FindingsHigh
Medium
Low
Previous run (3)ReviewRe-review (prior: FindingsHigh
Medium
Low
Previous run (4)ReviewRe-review (prior: The change aligns with ADR 0050 and is authorized by issue #2780. All prior stale-doc findings remain addressed. Six of the seven prior LOW findings remain valid on unchanged code (severity-anchored). One new medium finding on the changed sampling logic. FindingsMedium
Low
Previous run (5)ReviewRe-review (prior: No code changes since the prior review. All seven prior LOW findings remain valid and severity-anchored on unchanged code. The prior review's HIGH-severity The change aligns with ADR 0050's decision for "Framework-native OpenTelemetry" and is authorized by issue #2780 ("Telemetry phase 2 & 3 — OpenTelemetry Go SDK for trace export"). No scope creep. No security findings above LOW. No stale documentation references outside the diff. FindingsLow
Previous run (6)ReviewRe-review (prior: No code changes since the prior review. All seven prior LOW findings remain valid and severity-anchored on unchanged code. The prior review's HIGH-severity The change aligns with ADR 0050's decision for "Framework-native OpenTelemetry" and is authorized by issue #2780 ("Telemetry phase 2 & 3 — OpenTelemetry Go SDK for trace export"). No scope creep. No security findings above LOW. No stale documentation references outside the diff. FindingsLow
Previous run (7)ReviewRe-review (prior: The prior review's HIGH-severity AlwaysSample finding has been resolved: The All three prior stale-doc findings ( No new medium+ findings. The remaining findings are low-severity items from the prior review (severity anchored on unchanged code) plus one new edge-case finding. FindingsLow
Previous run (8)ReviewRe-review (prior: The prior review's HIGH-severity AlwaysSample finding has been resolved: The All three prior stale-doc findings ( No new medium+ findings. The remaining findings are low-severity items from the prior review (severity anchored on unchanged code) plus one new edge-case finding. FindingsLow
Previous run (9)ReviewRe-review (prior: The prior review's medium-severity stale-doc findings ( FindingsHigh
Low
Previous run (10)ReviewRe-review (prior: SummaryReplaces the bespoke two-layer telemetry architecture (L1 NDJSON recorder + L2 OTLP replay) with the OTel Go SDK's The code change is architecturally sound and consistent with ADR 0050's decision for "Framework-native OpenTelemetry." The fail-open guarantee is maintained: FindingsMedium
Low
Labels: PR refactors internal telemetry subsystem Previous run (11)ReviewRe-review (prior: SummaryReplaces the bespoke two-layer telemetry architecture (L1 NDJSON recorder + L2 OTLP replay) with the OTel Go SDK's The code change is architecturally sound and consistent with ADR 0050's decision for "Framework-native OpenTelemetry." The fail-open guarantee is maintained: FindingsMedium
Low
Labels: PR refactors internal telemetry subsystem Previous run (12)ReviewFindingsMedium
Low
|
36e2ef8 to
6ed0f8f
Compare
|
🤖 Finished Review · ✅ Success · Started 9:07 AM UTC · Completed 9:20 AM UTC |
21eb961 to
cf802f1
Compare
|
🤖 Review · |
|
🤖 Finished Review · ❌ Failure · Started 9:43 AM UTC · Completed 9:59 AM UTC |
cf802f1 to
230e3f3
Compare
|
🤖 Finished Review · ✅ Success · Started 1:18 PM UTC · Completed 1:30 PM UTC |
|
🤖 Review · ❌ Terminated · Started 1:46 PM UTC · Ended 1:55 PM UTC |
PR Summary by Qodorefactor(telemetry): replace bespoke recorder with OTel Go SDK
AI Description
Diagram
High-Level Assessment
Files changed (15)
|
Code Review by Qodo
1. ADR 0050 decision rewritten
|
b0ec67b to
d9c4077
Compare
|
🤖 Finished Review · ❌ Failure · Started 11:37 AM UTC · Completed 11:55 AM UTC |
waynesun09
left a comment
There was a problem hiding this comment.
Review Squad — 3 agents (Claude × 2, Grok) · round 3 at head d9c4077d
2 HIGH · 9 MEDIUM posted inline (11 unique findings after dedup and verification against prior rounds).
All 15 findings from the two prior review rounds are confirmed resolved or settled at head — not re-flagged. Today's bot finding (a) (OTEL_SDK_DISABLED suppressing Level 1 file) is now resolved via doc alignment. Bot finding (b) (NaN/Inf float marshal) remains unfixed and is re-flagged above at upgraded severity.
The two HIGHs are both trace-propagation regressions where deleted tests used to pin the contract — the test-coverage gap (flagged inline on telemetry_run_test.go) explains why they slipped through.
Assisted-by: Claude (review), Grok (review)
Replace the two-layer telemetry architecture (L1 hand-rolled NDJSON recorder + L2 post-run OTLP replay) with the OpenTelemetry Go SDK. Spans now export at runtime through configured exporters, eliminating the replay step entirely. BREAKING CHANGE: The bare `agent` attribute on the `run` span is now `fullsend.agent`. Update queries that filter on the old key. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Hector Martinez <hemartin@redhat.com>
d9c4077 to
33a9b65
Compare
|
🤖 Finished Review · ❌ Failure · Started 1:25 PM UTC · Completed 1:43 PM UTC |
waynesun09
left a comment
There was a problem hiding this comment.
Review Squad — round 4 re-review at 33a9b65b · APPROVED
10 of 11 round-3 findings verified fixed — both HIGHs (trace propagation) well-designed with TraceparentWithFlags + parentSampledProcessor. One surviving MEDIUM posted inline: --header flags silently dropped because the otelcol config doesn't reference OTEL_EXPORTER_OTLP_HEADERS. Non-blocking — the core telemetry migration is solid.
Assisted-by: Claude (review), Grok (review)
|
🤖 Finished Retro · ✅ Success · Started 3:03 PM UTC · Completed 3:19 PM UTC |
Retro: PR #4510 —
|
Summary
Replaces the two-layer telemetry system with the OpenTelemetry Go SDK (#2780).
Before: A hand-rolled NDJSON recorder wrote
run-telemetry.jsonlandrun-summary.jsonat runtime. After the run finished, a separate package read those files back and reconstructed OTel spans for OTLP export.After: The OTel SDK records spans directly through configured exporters. A file exporter writes OTLP JSON to
run-telemetry.jsonl; an OTLP HTTP exporter sends to a remote backend whenOTEL_EXPORTER_OTLP_ENDPOINTis set. No post-run replay step.Breaking change
The bare
agentattribute on therunspan is nowfullsend.agent. Consumers querying by the old key must update their queries.What changed
crypto/randinstead of derived from the SDK's trace ID.run-summary.jsonas a separate artifact.parentSampledProcessorsuppresses the entire trace from OTLP export when the remote parent is unsampled, not just the root span.hack/upload-traces.shreplays trace files into any OTLP backend viaotelcol-contrib, replacing the deleted Go replay tool.ADR:
docs/ADRs/0050-distributed-tracing-instrumentation.md.Test plan
go vetandgo testpass for affected packages🤖 Generated with Claude Code