Skip to content

feat: add locally_evaluated property to $feature_flag_called#130

Closed
luke-belton wants to merge 1 commit intomasterfrom
luke/locally-evaluated-property
Closed

feat: add locally_evaluated property to $feature_flag_called#130
luke-belton wants to merge 1 commit intomasterfrom
luke/locally-evaluated-property

Conversation

@luke-belton
Copy link
Copy Markdown
Contributor

Bring this in line with other SDKs by setting a locally_evaluated property on $feature_flag_called events to indicate whether the flag was evaluated locally.

Comment on lines +1019 to +1034
lastEvent := client.GetLastCapturedEvent()
if lastEvent == nil || lastEvent.Event != "$feature_flag_called" {
t.Errorf("Expected a $feature_flag_called event, got: %v", lastEvent)
}

if lastEvent != nil {
if lastEvent.Properties["$feature_flag"] != "test-get-feature" {
t.Errorf("Expected feature flag key 'test-get-feature', got: %v", lastEvent.Properties["$feature_flag"])
}
if lastEvent.Properties["$feature_flag_response"] != "variant-1" {
t.Errorf("Expected feature flag response 'variant-1', got: %v", lastEvent.Properties["$feature_flag_response"])
}
if lastEvent.Properties["locally_evaluated"] != true {
t.Errorf("Expected locally_evaluated to be true for local evaluation, got: %v", lastEvent.Properties["locally_evaluated"])
}
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

my local eval tests didn't seem to be working locally, so not sure about this 🤔

@luke-belton luke-belton marked this pull request as draft October 30, 2025 17:26
@github-actions
Copy link
Copy Markdown
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@github-actions github-actions Bot added the stale label Apr 14, 2026
@marandaneto marandaneto requested review from a team April 14, 2026 10:46
@luke-belton
Copy link
Copy Markdown
Contributor Author

I can't rebase this because there are unsigned commits in the history since I raised this PR - opened #176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant