Skip to content

fix(otel): add missing otel events for batch evaluation#4875

Merged
erka merged 1 commit into
v2from
rd/v2/batch-otel-events
Oct 11, 2025
Merged

fix(otel): add missing otel events for batch evaluation#4875
erka merged 1 commit into
v2from
rd/v2/batch-otel-events

Conversation

@erka

@erka erka commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

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

@erka
erka requested a review from a team as a code owner October 10, 2025 22:50
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Oct 10, 2025
@dosubot

dosubot Bot commented Oct 10, 2025

Copy link
Copy Markdown

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

How did I do? Any feedback?  Join Discord

@erka erka added the v2 Flipt v2 label Oct 10, 2025
@codecov

codecov Bot commented Oct 10, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.98%. Comparing base (a95bbdf) to head (f4be2b4).
⚠️ Report is 1 commits behind head on v2.

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     
Flag Coverage Δ
integrationtests 33.90% <0.00%> (-0.03%) ⬇️
unittests 49.70% <100.00%> (+0.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erka
erka force-pushed the rd/v2/batch-otel-events branch from 57abd51 to 8f40fbf Compare October 10, 2025 23:02
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]>
@erka
erka force-pushed the rd/v2/batch-otel-events branch from 8f40fbf to f4be2b4 Compare October 10, 2025 23:19
@markphelps
markphelps requested a review from Copilot October 11, 2025 13:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 addEvaluationEvent helper 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.

@markphelps markphelps left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice ty!

@erka
erka merged commit 4ab9d6b into v2 Oct 11, 2025
41 of 42 checks passed
@erka
erka deleted the rd/v2/batch-otel-events branch October 11, 2025 14:08
@github-project-automation github-project-automation Bot moved this to Done in Flipt V2 Oct 11, 2025
@dosubot

dosubot Bot commented Oct 11, 2025

Copy link
Copy Markdown

Documentation Updates

Checked 4 published document(s). No updates required.

How did I do? Any feedback?  Join Discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files. v2 Flipt v2

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants