[NA] [BE] feat: always persist online-evaluation monitoring traces - #7317
[NA] [BE] feat: always persist online-evaluation monitoring traces#7317alexkuzmik wants to merge 4 commits into
Conversation
Remove the onlineScoringTracingEnabled service toggle (env TOGGLE_ONLINE_SCORING_TRACING_ENABLED) so the LLM-as-judge online evaluation loop is always recorded as hidden source=evaluator monitoring traces. The three scorers now always start a real EvaluationRecorder; the trace-thread best-effort onErrorResume still degrades to NOOP on a project lookup failure. Drops the field from ServiceTogglesConfig, config.yml, config-test.yml, the OpenAPI schemas, and the generated Python/TS SDK types (the toggle was exposed via GET /v1/private/toggles). Origin feature: OPIK_6994. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Backend Tests - Unit Tests2 590 tests 2 588 ✅ 1m 16s ⏱️ Results for commit 62d0920. ♻️ This comment has been updated with latest results. |
Backend Tests - Integration Group 12264 tests 263 ✅ 4m 50s ⏱️ Results for commit 62d0920. ♻️ This comment has been updated with latest results. |
|
🌿 Preview your docs: https://opik-preview-c8295b3c-9d7d-44a2-a68c-3b12cc65935f.docs.buildwithfern.com/docs/opik 📌 Results for commit b4c504f |
…conditional The scorer unit tests relied on the (unstubbed) onlineScoringTracingEnabled toggle defaulting to false, which took the NOOP branch and never invoked onlineEvaluationRecorder.begin(). With the toggle removed the recorder is always started, so begin() must be stubbed to return EvaluationRecorder.NOOP in setup. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
I like the idea of this feature being always enabled, I believe there's no per customer need etc. to disable. I tested it in prod and looks nice.
However, I wouldn't rush to merge and deploy this. I'd recommend leave it baking for max 1 week in production, so you have this flag as a emergency stop measure, in case some issue happens.
Left couple of non-blocking comments, but I do recommend addressing them.
Per review: don't hand-edit Fern-generated files. Revert the manual removals from the OpenAPI specs and the Python/TS rest_api ServiceTogglesConfig types; the daily Fern codegen job will drop onlineScoringTracingEnabled once the backend stops returning it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Python SDK E2E Tests Results (Python 3.14)286 tests 284 ✅ 4m 20s ⏱️ Results for commit 708bc95. ♻️ This comment has been updated with latest results. |
Don't merge before 13.07.2025 |
…racing
Resolve conflicts in online-scoring scorers: keep the {{trace}}/{{span}}
agentic triggers from main while dropping the isOnlineScoringTracingEnabled
toggle gate so the monitoring recorder is created unconditionally, and stub
the recorder in the span/thread scorer tests now that tracing always runs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
⏱️ pre-commit per-hook timing
⏭️ 40 skipped (no matching files changed)
|
Details
Online-evaluation monitoring traces (OPIK_6994) were gated behind the
onlineScoringTracingEnabledservice toggle (envTOGGLE_ONLINE_SCORING_TRACING_ENABLED, defaulttrue). This PR removes that configuration so the behavior is always on — every LLM-as-judge online evaluation (trace / span / thread) is always recorded as a hiddensource=evaluatormonitoring trace.EvaluationRecorderinstead of branching on the toggle.onErrorResume→EvaluationRecorder.NOOPfallback so a project lookup failure still can't abort scoring.ServiceTogglesConfig,config.yml, andconfig-test.yml. The toggle is exposed viaGET /v1/private/toggles, but per review the Fern-autogenerated OpenAPI specs and Python/TSrest_apitypes are left untouched — the daily Fern codegen job will droponlineScoringTracingEnabledonce the backend stops returning it.Change checklist
Issues
AI-WATERMARK
AI-WATERMARK: yes
Testing
mvn -o compileinapps/opik-backend— compiles cleanly.onlineScoringTracingEnabled/TOGGLE_ONLINE_SCORING_TRACING_ENABLEDin the repo.true), so they exercise the now-unconditional path.Documentation
The removed toggle was infra config only; no user-facing docs reference it.