Skip to content

Commit a71a8a8

Browse files
authored
feat: Allow capturing feature flags in debug snapshots (#5004)
## Explanation The controller metadata for the `RemoteFeatureFlagController` has been updated to declare the feature flag state as anonymous. These values are set by us and do not contain any PII. This allows us to capture this state in Sentry debug snapshots, which could be very useful for debugging. ## References N/A ## Changelog See changelog diff ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
1 parent 1d1b0e1 commit a71a8a8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/remote-feature-flag-controller/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Update metadata to declare feature flags as anonymous ([#5004](https://github.com/MetaMask/core/pull/5004))
13+
- This lets us capture these in debug state snapshots to help diagnose errors
14+
1015
## [1.0.0]
1116

1217
### Added

packages/remote-feature-flag-controller/src/remote-feature-flag-controller.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export type RemoteFeatureFlagControllerState = {
2424
};
2525

2626
const remoteFeatureFlagControllerMetadata = {
27-
remoteFeatureFlags: { persist: true, anonymous: false },
27+
remoteFeatureFlags: { persist: true, anonymous: true },
2828
cacheTimestamp: { persist: true, anonymous: true },
2929
};
3030

0 commit comments

Comments
 (0)