Skip to content

feat: Suppress individual events and split summary counters for override-affected evaluations - #223

Draft
kinyoklion wants to merge 2 commits into
rlamb/overrides-java-override-layerfrom
rlamb/overrides-java-override-events
Draft

kinyoklion wants to merge 2 commits into
rlamb/overrides-java-override-layerfrom
rlamb/overrides-java-override-events

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

This connects the override-affected marking of an evaluation to analytics events, as the OVERRIDE specification requires. An evaluation that read a definition from the override store, directly or through a prerequisite or a segment, produces no individual feature event and no debug event, whatever the flag's configuration requests. It is still counted in summary events, in a separate counter that carries overrideAffected: true, so LaunchDarkly can tell override-affected counts from ordinary counts of the same flag, variation, and version. A prerequisite record carries the prerequisite's own marking: an unaffected prerequisite evaluated inside a marked evaluation still produces its individual event.

  • EventProcessor gains an overload of recordEvaluationEvent with the marking. It is a default method that ignores the marking and delegates to the existing method, so a custom implementation keeps compiling and behaving as before. The SDK's implementations override it.
  • The evaluator's event recorder passes the evaluation result's marking for top-level, prerequisite, and requested-type-mismatch records. An evaluation that throws records its error event with the evaluated flag's own marking, because that definition was read before the failure. Event generation keys on that value alone and does not read the evaluation reason.
  • The server SDK now depends on launchdarkly-java-sdk-internal 1.13.0, whose event processor suppresses individual events for marked evaluations and splits the summary counters by the marker. CI for this change cannot pass until that version is released.
  • The OVERRIDE specification's vector runner now also asserts the per-evaluation summary marking.

Flag overrides are currently experimental and subject to change.

This PR depends on the override layer change (rlamb/overrides-java-override-layer) and is based on that branch; retarget it to feat/overrides once that branch merges.

The existing file data source keeps its current behavior; this change does not touch its code paths.

SDK-3246


Note

Overview
Wires override-affected evaluations into the server SDK analytics path per the OVERRIDE spec: evaluations that read override-store data (flag, prerequisite, or segment) pass an overrideAffected flag into EventProcessor.recordEvaluationEvent, which launchdarkly-java-sdk-internal 1.13.0 uses to suppress individual feature/debug events and emit summary counters tagged with overrideAffected: true.

EventProcessor adds a default overload with the new parameter (existing custom processors keep compiling by ignoring it). The evaluator’s EvaluationRecorder forwards EvalResult.isOverrideAffected() for success, prerequisite, type-mismatch, and error paths; prerequisite records use the prerequisite’s own marking. Tests cover client-level marking, flushed payload shape, spec vectors summaryOverrideAffected, and marked error events.

Reviewed by Cursor Bugbot for commit 0a91418. Bugbot is set up for automated code reviews on this repo. Configure here.

Opened from termag

@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-layer branch from 3ddbca0 to 51b497a Compare September 28, 2026 21:04
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-events branch from bd3633b to e1dd774 Compare September 28, 2026 21:04
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-layer branch from 51b497a to 3e12570 Compare October 1, 2026 23:44
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-events branch from e1dd774 to 752e614 Compare October 1, 2026 23:44
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-layer branch from 3e12570 to 2d12762 Compare October 3, 2026 00:58
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-events branch from 752e614 to f76f228 Compare October 3, 2026 00:58
@kinyoklion

Copy link
Copy Markdown
Member Author

bugbot review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-events branch from f76f228 to b03ecdf Compare October 3, 2026 01:43
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-layer branch from e58a4f7 to ee0d2be Compare October 13, 2026 21:02
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-events branch 2 times, most recently from ed4075d to c5cfe53 Compare October 16, 2026 21:18
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-layer branch from 5a27c9f to b5020db Compare October 28, 2026 22:19
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-events branch 3 times, most recently from dd7ee83 to 43080b1 Compare October 29, 2026 16:49
…ide-affected evaluations

The OVERRIDE specification requires an override-affected evaluation to
produce no individual feature event and no debug event, whatever the
flag requests, while still being counted in summary events under a
separate counter that carries the overrideAffected marker. A
prerequisite record carries the prerequisite's own marking.

EventProcessor gains an overload of recordEvaluationEvent with the
marking. It is a default method that delegates to the existing method,
so custom implementations keep compiling. The SDK's implementations
override it and the evaluator's event recorder passes the evaluation
result's marking for top-level, prerequisite, and requested-type
mismatch records. Event generation keys on that value alone.

The server SDK now depends on launchdarkly-java-sdk-internal 1.13.0,
which carries the marker through Event.FeatureRequest, the summarizer,
the output formatter, and the event processor. CI for this change
cannot pass until that version is released. The specification's vector
runner now also asserts the per-evaluation summary marking.

Flag overrides are currently experimental and subject to change.
The error event recorded when an evaluation throws now carries the
marking of the flag's own definition, which was read before the failure,
the same marking as the error result. A marked error event produces no
individual event and is counted under the marked summary counter.
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-layer branch from 22ee106 to e95c7a9 Compare October 29, 2026 17:01
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-java-override-events branch from 43080b1 to 0a91418 Compare October 29, 2026 17:01
@kinyoklion

Copy link
Copy Markdown
Member Author

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 0a91418. Configure here.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant