Skip to content

feat: Add feature flag support - #3108

Open
jespersandnielsen wants to merge 2 commits into
getsentry:masterfrom
jespersandnielsen:feat/feature_flags
Open

jespersandnielsen wants to merge 2 commits into
getsentry:masterfrom
jespersandnielsen:feat/feature_flags

Conversation

@jespersandnielsen

@jespersandnielsen jespersandnielsen commented Oct 1, 2026 •

Copy link
Copy Markdown

Add Sentry.add_feature_flag and Scope#add_feature_flag to record boolean flag evaluations. Flags are kept in a 100-entry LRU buffer on the scope, attached to error events as contexts.flags.values (not transactions), and recorded on the active span as flag.evaluation.* data (max 10 per span).

Thanks for your Pull Request 🎉

Please keep these instructions in mind so we can review it more efficiently:

  • Add the references of all the related GH issues, Linear IDs or PRs in the description
  • Whether it's a new feature or a bug fix, make sure they're covered by new test cases
  • If this PR contains any refactoring work, please give it its own commit(s)
  • Finally, please add an entry to the corresponding changelog
  • PR title should use conventional commit style (feat:, fix:, ref:, meta:)

Other Notes

Description

Describe your changes:

Add Sentry.add_feature_flag and Scope#add_feature_flag to record boolean
flag evaluations. Flags are kept in a 100-entry LRU buffer on the scope,
attached to error events as contexts.flags.values (not transactions), and
recorded on the active span as flag.evaluation.* data (max 10 per span).
@jespersandnielsen
jespersandnielsen marked this pull request as ready for review October 1, 2026 11:36
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.

Support for tracking feature flags

1 participant