You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🐛 collect feature flag evaluations before rum start in a map instead of a buffer
Previously, `addFeatureFlagEvaluation` calls made before `startRum` were
buffered and replayed after init. This caused the `BoundedBuffer` limit to
be reached when many flags were evaluated early, silently dropping other
buffered calls (e.g. `setUser`).
Instead, pre-start evaluations are now collected into a `FeatureFlagCollection`
(a `Map<string, ContextValue>`) and passed to `startFeatureFlagContexts`,
which seeds the first view's context with it. Subsequent views start with an
empty collection as before. This trades per-evaluation ordering for
reliability.
// TODO next major: remove the globalContextManager, userContextManager and accountContextManager from preStartStrategy and use an empty context instead
73
77
constglobalContext=buildGlobalContextManager()
@@ -123,7 +127,8 @@ export function createPreStartStrategy(
123
127
deflateWorker,
124
128
initialViewOptions,
125
129
telemetry,
126
-
hooks
130
+
hooks,
131
+
initialFeatureFlagCollection
127
132
)
128
133
129
134
bufferApiCalls.drain(startRumResult)
@@ -324,8 +329,13 @@ export function createPreStartStrategy(
0 commit comments