-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from global service registry to dependency "injection" #1818
Milestone
Comments
jjbayer
added a commit
that referenced
this issue
Mar 14, 2023
Inject addresses of services instead of calling the global registry in the outcome producer. ref: #1818 Co-authored-by: Oleksandr Kylymnychenko <oleksandr@sentry.io>
This was referenced Mar 14, 2023
At this point we still have few things left where the global registry is used. Here is the quick grep: relay-server/src/utils/managed_envelope.rs
191: let outcome_aggregator = TrackOutcome::from_registry();
relay-server/src/endpoints/public_keys.rs
12: let relay_cache = RelayCache::from_registry();
relay-server/src/endpoints/outcomes.rs
13: let producer = OutcomeProducer::from_registry();
and relay-server/src/actors/envelopes.rs
110: ProjectCache::from_registry().send(UpdateRateLimits::new(
relay-server/src/endpoints/common.rs
289: EnvelopeProcessor::from_registry().send(ProcessMetrics {
309: ProjectCache::from_registry().send(ValidateEnvelope::new(event_context));
318: ProjectCache::from_registry().send(ValidateEnvelope::new(managed_envelope));
relay-server/src/endpoints/health_check.rs
16: Ok(match HealthCheck::from_registry().send(message).await {
relay-server/src/endpoints/forward.rs
243: UpstreamRelay::from_registry().send(SendRequest(ForwardRequest {
relay-server/src/utils/managed_envelope.rs
257: TestStore::from_registry().send(Capture::rejected(self.envelope.event_id(), &outcome));
Which are mostly endpoints and This is basically a followup for #1938. Once the migration to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently we use a global registry
relay/relay-server/src/service.rs
Line 35 in 861966f
This introduces few challenges:
Subtasks
SystemRegistry
behavior #1610As 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
Project
#1928The text was updated successfully, but these errors were encountered: