Skip to content

Conversation

@EddShaw
Copy link

@EddShaw EddShaw commented Jan 14, 2026

This allows us to decouple evaluation from exposure logging. We can check local or distributed caches if we've already reported this exposure, without blocking the gate/experiment evaluation.

One issue with this PR I already foresee: I imagine Statsig would like to retain control over the de-duplication logic. Possibly, the hook could accept a dedupe key additionally? (I hadn't spotted that we already have a method for deriving a dedupe key in the SDK when I initially implemented this. 🙈)

I don't expect this PR to merge (at least, as is). Mostly, I'm hoping to open the conversation about how Statsig might support the eval/exposure logging decoupling (ideally, with some supported wire format for the exposure itself).

(Experiments/Layers haven't had the equivalent changes made to them yet - but I can come back and update those if Statsig are keen.)

This allows us to decouple evaluation from exposure logging. We can
check local or distributed caches if we've already reported this
exposure.

Work-in-progress - I imagine Statsig would like to retain control
over the de-duplication logic. Possibly, the hook can accept a dedupe
key instead/additionally.
}

// Logs an exposure event for the dynamic config
func (c *Client) LogExposureEvent(event ExposureEvent) {
Copy link
Author

Choose a reason for hiding this comment

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

LogExposureEvent allows us to report an exposure after checking our de-duplication cache.

❔ Should we expose a Immediately variant of this? I don't think that's necessary for our use-case.

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