feat(BRIDGE-266): heartbeat telemetry update; extra integration tests;

This commit is contained in:
Atanas Janeshliev
2024-11-22 14:09:48 +00:00
parent cdcdd45bcf
commit 2e98d64f94
17 changed files with 411 additions and 256 deletions

View File

@ -250,7 +250,7 @@ func (s *Service) addMetricsIfClients(metric ...proton.ObservabilityMetric) {
s.addMetrics(metric...)
}
func (s *Service) RegisterUserClient(userID string, protonClient *proton.Client, telemetryService *telemetry.Service) {
func (s *Service) RegisterUserClient(userID string, protonClient *proton.Client, telemetryService *telemetry.Service, userPlan string) {
s.log.Info("Registering user client, ID:", userID)
s.withUserClientStoreLock(func() {
@ -260,7 +260,7 @@ func (s *Service) RegisterUserClient(userID string, protonClient *proton.Client,
}
})
s.distinctionUtility.registerUserPlan(s.ctx, protonClient, s.panicHandler)
s.distinctionUtility.setUserPlan(userPlan)
// There may be a case where we already have metric updates stored, so try to flush;
s.sendSignal(s.signalDataArrived)