Repository navigation
feat: Support getExperimentFlag, trackEvent and trackExposure methods - #127
Conversation
Its entry in Flagsmith/sdk-spec's compatibility matrix at v0.7.1: `core or events or local-evaluation`.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Implements SDK spec v0.6.0's getExperimentFlag, trackEvent and trackExposureEvent. With `enable_events: true`, the client buffers events and sends them in batches to the Flagsmith events API (`events_api_url`). `get_experiment_flag` records an identity's exposure to the variant it was served when it is in the feature's running experiment, which flags now expose as `variant` and `experiment`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 3ec4437)
A slow or failing events API request held the flush lock while every further event past the buffer limit started another flush thread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 2526c08)
- Stop running event processors at exit from one registry that a stopped processor leaves, instead of an at_exit block per start that kept every processor in memory. - Drop the identifier from the duplicate exposure debug log. - Give the accurate reason when get_experiment_flag skips an exposure because flags come from the environment document, which carries no experiment data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit f829d07)
|
The spec run was red because v0.7.1's compatibility matrix adds the I re-applied the earlier event tracking work:
The only conflict was in Checks run locally:
|
getExperimentFlag, trackEvent and trackExposure methods
Offline mode makes no network calls, but a client created with both offline_mode and enable_events still sent events to the events API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 I have created a release *beep* *boop* --- ## [5.2.0](v5.1.0...v5.2.0) (2026-11-09) ### Features * Support `getExperimentFlag`, `trackEvent` and `trackExposure` methods ([#127](#127)) ([670b413](670b413)) ### Bug Fixes * Serve multivariate segment overrides their variant under local evaluation ([#128](#128)) ([dbb7a83](dbb7a83)) ### Other * Let Renovate keep updating spec bumps the webhook handler commits to ([#123](#123)) ([a6ccd7f](a6ccd7f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Contributes to Flagsmith/sdk-spec#13