fix(otel): add missing otel events for batch evaluation#4875
Conversation
|
Related Documentation Checked 4 published document(s). No updates required. You have 1 draft document(s). Publish docs to keep them always up-to-date |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2 #4875 +/- ##
==========================================
+ Coverage 58.62% 58.98% +0.35%
==========================================
Files 135 135
Lines 16850 16861 +11
==========================================
+ Hits 9878 9945 +67
+ Misses 6287 6235 -52
+ Partials 685 681 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
57abd51 to
8f40fbf
Compare
The batch evaluation endpoint was missing OpenTelemetry event tracking that the individual evaluation endpoint had. This adds consistent event tracking to both endpoints for better observability. - Refactored common evaluation logic to emit otel events - Applied event tracking to batch evaluation endpoint - Reduced code duplication between evaluation methods Signed-off-by: Roman Dmytrenko <[email protected]>
8f40fbf to
f4be2b4
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds consistent OpenTelemetry event tracking to the batch evaluation endpoint by refactoring common evaluation logic into a shared helper method. The batch evaluation endpoint was missing the same tracing events that individual evaluation endpoints already had.
- Refactored duplicate tracing code into a shared
addEvaluationEventhelper method - Added missing OpenTelemetry event tracking to batch evaluation endpoints
- Added comprehensive test coverage for tracing functionality across all evaluation methods
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/server/evaluation/evaluation.go | Added shared addEvaluationEvent helper and integrated tracing events into batch evaluation logic |
| internal/server/evaluation/ofrep_bridge.go | Refactored to use the new shared tracing helper method |
| internal/server/evaluation/evaluation_test.go | Added comprehensive tests for tracing functionality across evaluation methods |
| internal/server/evaluation/ofrep_bridge_test.go | Added tests for OFREP evaluation tracing behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
The batch evaluation endpoint was missing OpenTelemetry event tracking
that the individual evaluation endpoint had. This adds consistent event
tracking to both endpoints for better observability.