feat(#6458): export eval measurement scores via OTLP - #6459
Conversation
Wire MeasureAndExport to emit gen_ai.evaluation.result span events on the same TraceID when OTEL_EXPORTER_OTLP_* is set, matching ADR 0087 / 0050. Local JSONL stays source of truth; remote export is fail-open. Signed-off-by: Adam Scerra <ascerra@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
PR Summary by QodoExport eval measurement scores as OTLP GenAI evaluation span events
AI Description
Diagram
High-Level Assessment
Files changed (11)
|
Site previewPreview: https://51652581-site.fullsend-ai.workers.dev Commit: |
|
🤖 Review · Commit: |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Code Review by Qodo
1.
|
Bound post-hoc export retries/budget, share fullsend resource identity, batch scores, skip empty span IDs, keep Ok status for all labels, omit score.value on skip, and sync docs that still said OTLP was planned. Signed-off-by: Adam Scerra <ascerra@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Review squad follow-upAddressed verified findings from the review pass:
Deferred (documented / intentional): separate remote-export ledger for OTLP retry after local success — remote remains best-effort once; Assessments stay a MLflow-side consumer, not core. |
|
🤖 Finished Review · ✅ Success · Started 7:52 PM UTC · Completed 8:07 PM UTC Commit: |
ReviewFindingsLow
Previous runReviewFindingsLow
Next steps:
Previous run (2)ReviewFindingsMedium
Low
Next steps:
Previous run (3)ReviewFindingsMedium
Low
Next steps:
Previous run (4)ReviewFindingsLow
Next steps:
Previous run (5)ReviewFindingsLow
Previous run (6)ReviewFindingsLow
Previous run (7)ReviewFindingsLow
Previous run (8)ReviewFindingsLow
Previous run (9)ReviewFindingsMedium
Low
Previous run (10)ReviewFindingsLow
Previous run (11)ReviewFindingsLow
Info
Previous run (12)ReviewFindingsLow
Previous run (13)ReviewFindingsLow
Previous run (14)ReviewFindingsMedium
Low
|
waynesun09
left a comment
There was a problem hiding this comment.
Review (MEDIUM+)
Four inline comments on unique issues. Fail-open OTLP path looks solid (empty IDs skipped, export bounded, batch processor). The correctness gap to fix is resource identity.
Already posted (skipped): ADR 0087 Decision rewrite on docs/ADRs/0087-eval-measurements-online-trace-scoring.md — existing thread already covers it. Preferred fix remains a 0050-style annotation rather than editing the Decision.
Align score resource service.version with CLI Version(), no-op OTLP when inbound TRACEPARENT is unsampled, apply shared span limits and truncate evaluation explanations, cite GenAI semconv and clarify vendor UI mapping, and restore ADR 0087 Decision with an Implemented annotation. Signed-off-by: Adam Scerra <ascerra@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 11:33 AM UTC · Completed 11:53 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $6.68 |
waynesun09
left a comment
There was a problem hiding this comment.
Additional review pass (8 findings, all verified against PR head 911b9bf and cross-checked against existing threads for duplicates).
Scope TRACEPARENT suppression per TraceID via W3C propagator, export already-persisted scores on mid-loop persist failure, clear transient export latch on success, hermetic OTEL in Measure tests, and refresh the GenAI semconv citation. Signed-off-by: Adam Scerra <ascerra@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Superseded by updated review
Keep disjoint BatchSpanProcessor failures instead of clearing on a later success, size MaxExportBatchSize to the materialized set, and make prove-otlp-scores fail on RemoteExportWarning / event shortfalls. Signed-off-by: Adam Scerra <ascerra@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review · Commit: |
|
🤖 Finished Review · ✅ Success · Started 11:13 AM UTC · Completed 11:33 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $6.65 |
Superseded by updated review
|
🤖 Finished Retro · ✅ Success · Started 2:53 PM UTC · Completed 3:17 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $6.32 |
Retro: PR #6459 — Export eval measurement scores via OTLPThis was a human-authored PR (ascerra) implementing ADR 0087 portable remote score export — 19 files, ~1,500 lines, merged after 19 days and 23 commits. The PR went through 7 rounds of human review (waynesun09) and 15 successful automated review runs before merging. Timeline
Evidence for existing issuesAll potential proposals map to existing open issues. The concrete evidence from this retro is summarized below for each. fullsend-ai/agents#1138 (validate-code-output.sh scans all branch commits instead of agent-only): This bug caused all three fix agent failures on this PR. The validation script uses fullsend-ai/agents#1092 (incremental review mode for re-reviews): Of 15 successful review runs on this PR, only 2–3 produced new findings (13% hit rate). The remaining 12 ran the full Opus pipeline ( fullsend-ai/agents#1106 and #1051 (review agent self-dismissal / contradictory findings): Across 14 review sweeps, the bot produced 29 distinct findings — all rated [low] severity, many containing self-dismissal language ("intentional and tested," "harmless," "minimal practical risk"). Meanwhile, the human reviewer found 21 findings including 5+ correctness/concurrency bugs (mid-loop persist error skipping OTLP, hack tool data race, capturingExporter dropping batch errors, prove-otlp-scores reporting PASS despite warnings, attribute truncation ignoring operator limits). The bot's flat severity calibration means genuine concerns near real bugs (e.g., capturingExporter overwrite) were indistinguishable from cosmetic naming nits. fullsend-ai/agents#545 (correctness sub-agent should trace caller chains): The bot's analysis appears function-local — it never traced cross-function control flow. This caused it to miss the "mid-loop persist error silently skips OTLP export" bug (requires following a non-obvious code path across multiple functions) and the hack tool data race (requires reasoning about concurrent access patterns). The human reviewer caught both. fullsend-ai/agents#552 (agent definitions should prohibit git commit -s): In fix attempt 1, the agent added a Signed-off-by trailer despite skill instructions. The agent's behavioral tendency to mimic human DCO patterns persists even after #6651 was closed (Aug 26). Stronger prohibition in agent definitions is still needed. fullsend-ai/fullsend#6688 (DCO checks block bot/agent commits): The broader DCO problem is confirmed — fix agent cannot operate on PRs with human DCO-signed commits until bot vs. human commit identification is reliable. What went well
No new proposals filedAll improvement opportunities identified map to existing open issues in the agents repo or fullsend repo. The evidence above has been documented for reference. |
Summary
eval-measurements.jsonl, newly scored rows also emitgen_ai.evaluation.resultspan events on the same TraceID whenOTEL_EXPORTER_OTLP_*is set (same path as ADR 0050 agent traces).run-telemetry.jsonl.MLFLOW_*/ Assessments) in core — MLflow Assessments UI can be a separate consumer of the OTLP event.Closes #6458
Test plan
go test ./internal/evalmeasure/ ./internal/telemetry/84d470ba…)tr-84d470ba2451ffeccfe09022d9b2aebdeval-measureposts scores when OTEL is setMade with Cursor