Skip to content

Commit

Permalink
fix(metrics): restrict metrics collection of aliased service on creat…
Browse files Browse the repository at this point in the history
…ion (#1557)
  • Loading branch information
kmd-fl committed Apr 7, 2023
1 parent c741e24 commit 040eb50
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion particle-services/src/app_services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,12 @@ impl ParticleAppServices {
})?;
let stats = service.module_memory_stats();
let stats = ServiceMemoryStat::new(&stats);
let service_type = ServiceType::Service(aliases.first().cloned());
let allowed_alias = if worker_id == self.config.local_peer_id {
aliases.first().cloned()
} else {
None
};
let service_type = ServiceType::Service(allowed_alias);
let service = Service::new(
Mutex::new(service),
service_id.clone(),
Expand Down

0 comments on commit 040eb50

Please sign in to comment.