Repository navigation
feat: tag OpenFeature exposures with $openfeature_provider (SDK-448) - #202
Open
ketanmixpanel wants to merge 1 commit into
Open
ketanmixpanel wants to merge 1 commit into
ketanmixpanel wants to merge 1 commit into
Conversation
Exposures fired through the Mixpanel OpenFeature provider now include "$openfeature_provider": true so they can be told apart from direct SDK flag calls. Direct SDK calls are unchanged. No public API change: the provider signals the SDK through an argument it already passes on every evaluation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge. Reviews (1) · Last reviewed commit: "feat: tag OpenFeature exposures with $op..." · Reviewed by Greptile |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #202 +/- ##
==========================================
+ Coverage 96.39% 96.51% +0.11%
==========================================
Files 15 15
Lines 2888 2955 +67
Branches 176 180 +4
==========================================
+ Hits 2784 2852 +68
+ Misses 67 66 -1
Partials 37 37
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ketanmixpanel
marked this pull request as ready for review
November 12, 2026 12:28
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SDK-448:
$experiment_startedexposures fired through the Mixpanel OpenFeature provider now include"$openfeature_provider": true, so OpenFeature usage can be told apart from direct SDK flag calls. Direct SDK calls are unchanged (no property).No public API change: no new public methods, parameters or fields. The provider signals the SDK through an argument it already passes on every evaluation.
How
"$openfeature_provider": trueto the evaluation context it already passes togetVariant, set after the customer attributes so a same-named attribute cannot override it.distinct_id) copies the marker onto$experiment_startedwhen the context value is exactlytrue. Covers local and remote evaluation.distinct_idandcustom_properties.Testing
track_exposure_eventmethods also honour the marker since they receive a context.pytest(SDK): 393 passed. Provider: 57 passed.ruff check: no new errors (19 SDK / 3 provider, all pre-existing).Note: marker is sent to the server on remote evaluation
Because the marker lives in the evaluation context, remote evaluation sends it to
/flagswith the rest of the context. The flags API accepts and ignores it (checked inanalytics/go/src/mixpanel.com/flags/api/handlers/evaluatefeatureflags.go):distinct_idanddevice_id;distinct_id/device_id,custom_propertiesand hierarchical group IDs;logRequestdoes not log it.So it has no effect on targeting, rollout or variant assignment; it is only visible in the GET
contextquery parameter.Release order
Older SDKs ignore the marker, so the provider change is safe on its own (no errors; the property just does not appear). The property appears once customers run an SDK release containing this change; the provider minimum SDK version was intentionally not bumped here and should be raised after the SDK release. No version or changelog edits.
🤖 Generated with Claude Code