Skip to content

fix: Exposure events sent without a variant and duplicated within a flush interval - #233

Draft
khvn26 wants to merge 1 commit into
mainfrom
fix/flag-exposure-event-conditions
Draft

fix: Exposure events sent without a variant and duplicated within a flush interval#233
khvn26 wants to merge 1 commit into
mainfrom
fix/flag-exposure-event-conditions

Conversation

@khvn26

@khvn26 khvn26 commented Aug 4, 2026

Copy link
Copy Markdown
Member

Closes #232.

get_experiment_flag() now sends the exposure event only when the flag exists, is enabled and carries a variant, and the event value is always the variant key. Each skipped case logs its cause at debug level: feature not found, feature disabled, or no variant.

The event processor now deduplicates equal exposure events buffered within one flush interval. Custom events are never deduplicated. Duplicates from a failed-flush requeue remain possible (fine because delivery is at-least-once).

…lush interval

Send the $flag_exposure event from get_experiment_flag only when the
flag exists, is enabled and carries a variant, with the variant key as
the event value; log the cause at debug level otherwise. Deduplicate
equal exposure events buffered within one flush interval, keyed on
feature name, identifier and value.

beep boop
@khvn26
khvn26 requested a review from a team as a code owner August 4, 2026 11:35
@khvn26
khvn26 requested review from emyller and removed request for a team August 4, 2026 11:35
@khvn26
khvn26 marked this pull request as draft August 4, 2026 14:56
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.

get_experiment_flag(), $flag_exposure event

2 participants