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
ref(cache): Move buffering of pending envelope to ProjectCache (#1879)
These changes moving buffering of the incoming envelopes in the
`ProjectCache`.
Current implementation still keeps, so called queue in memory and using
`HashMap` with a composite key `QueueKey {key, sampling_key}`, where
`sampling_key` can be the same as a key if there is no sampling project
identified. The values to these keys are `Vec` of boxed `Envelope` with
their `EnvelopeContext`.
Once we get an update for project state, we check all variants of
`QueueKey` which contains the current `ProjectKey` and if all the
project states are cached we try to flush buffered envelopes indexed by
these `QeueuKey`.
The envelops will be buffered if:
* the project state is not fetched yet
* root project is here but the sampling project state is not fetched yet
* the sampling project state is here but the root project is not fetched
yet
This change also removes all the buffering from the `Project` and
reduces its responsibility. Now it just keeps its own state and
configuration and the envelope handling is done outside of it.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@
21
21
- Revert back the addition of metric names as tag on Sentry errors when relay drops metrics. ([#1873](https://github.com/getsentry/relay/pull/1873))
22
22
- Tag the dynamic sampling decision on `count_per_root_project` to measure effective sample rates. ([#1870](https://github.com/getsentry/relay/pull/1870))
23
23
- Deprecate fields on the profiling sample format. ([#1878](https://github.com/getsentry/relay/pull/1878))
24
+
- Move the pending envelopes buffering into the project cache. ([#1879](https://github.com/getsentry/relay/pull/1879))
0 commit comments