Skip to content

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

Draft
kinyoklion wants to merge 1 commit into
rlamb/overrides-java-override-layerfrom
rlamb/overrides-java-override-events
Draft

kinyoklion wants to merge 1 commit into
rlamb/overrides-java-override-layerfrom
rlamb/overrides-java-override-events

Conversation

@kinyoklion

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

…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.

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