Repository navigation
Closed
Milestone
Description
Currently we use a global registry
relay/relay-server/src/service.rs
Line 35 in 861966f
| pub static REGISTRY: OnceBox<Registry> = OnceBox::new(); |
This introduces few challenges:
- it's kind of difficult to test separate parts of the services when they are depend on each other
- it's not possible to predict the oder in which services are shutting down, and we might be losing some data
### Subtasks
- [ ] https://github.com/getsentry/relay/issues/1610
- [ ] https://github.com/getsentry/relay/issues/1711
- [ ] https://github.com/getsentry/relay/issues/1629
- [ ] https://github.com/getsentry/relay/issues/1608
As an example how this could look like you can refer to #1770, which introduces also a small isolated test for only 1 service. This will have to be changed for all services:
### PRs
- [ ] https://github.com/getsentry/relay/pull/1770
- [ ] https://github.com/getsentry/relay/pull/1926
- [ ] https://github.com/getsentry/relay/pull/1927
- [ ] https://github.com/getsentry/relay/pull/1928
- [ ] https://github.com/getsentry/relay/pull/1932
- [ ] https://github.com/getsentry/relay/pull/1946
- [ ] https://github.com/getsentry/relay/pull/1947
- [ ] https://github.com/getsentry/relay/pull/1956
Metadata
Metadata
Assignees
Labels
No labels
Activity
ref(outcomes): Do not use registry in outcome producer (#1927)
olksdr commentedon Mar 22, 2023
At this point we still have few things left where the global registry is used.
Here is the quick grep:
and
Which are mostly endpoints and
utils/managed_envelope.rswhich in few cases is also used in the endpoints.This is basically a followup for #1938. Once the migration to
axumis done we can remove the rest of the global registry access and we might also remove global registry all together.