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
Fix race condition in Client Side Stats enablement (#8509)
## Summary of changes
Fixes a race condition in client-side-stats enablement
## Reason for change
A unit test was flaking, where there was a delay in obfuscation, so we
had 2 buckets - one with obfuscated resource name, and one without.
## Implementation details
Move the setting of `CanComputeStats = true` to the _end_ of the method,
_after_ setting peer tags and obfuscation, so that when it switches
`false` -> `true`, it already has the full config.
> [!WARNING]
> There _is_ still a race condition when config is _updated_ for an
_already enabled_ stats config. In that case the obfuscation/peer tags
will be briefly out of sync theoretically. But I don't think that's a
big issue, and would only occur if the agent changes during application
execution, which is rare
## Test coverage
Covered by the unit tests already (they shouldn't flake now).
## Other details
0 commit comments