Skip to content

feat: support-evaluation-tracking-api#196

Open
Zaimwa9 wants to merge 9 commits intomainfrom
feat/support-evaluation-tracking-api
Open

feat: support-evaluation-tracking-api#196
Zaimwa9 wants to merge 9 commits intomainfrom
feat/support-evaluation-tracking-api

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented Apr 13, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Related JS client PR

Contributes to Flagsmith/flagsmith-openfeature-provider-python#34

Adds pipeline analytics support to the Python client, enabling buffered event tracking that posts to POST {url}v1/analytics/batch. This lays the groundwork for the OpenFeature provider to delegate its track() method to the client.

  • PipelineAnalyticsConfig dataclass for configuration: analytics server URL, buffer size, and flush interval
  • PipelineAnalyticsProcessor event processor with:
    • record_evaluation_event(), automatic on get_flag() call, deduplicated within each flush window
    • record_custom_event(), explicit, never deduplicated
    • Periodic flush
    • Failed flush re-queues events (capped at max_buffer)
  • Flagsmith.track_event() — public API for recording custom events
  • Flags.get_flag(), automatically records evaluation events when a pipeline processor is configured
  • resolve_trait_values() — extracted shared helper for unwrapping TraitConfig

How did you test this code?

  • Added tests

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner April 13, 2026 15:30
@Zaimwa9 Zaimwa9 requested review from khvn26 and removed request for a team April 13, 2026 15:30
@Zaimwa9 Zaimwa9 marked this pull request as draft April 13, 2026 15:30
@Zaimwa9 Zaimwa9 marked this pull request as ready for review April 14, 2026 09:14
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