diff --git a/protocol/lavasession/consumer_session_manager.go b/protocol/lavasession/consumer_session_manager.go index 10d6c50f42..678990c087 100644 --- a/protocol/lavasession/consumer_session_manager.go +++ b/protocol/lavasession/consumer_session_manager.go @@ -1093,9 +1093,10 @@ func (csm *ConsumerSessionManager) updateMetricsManager(consumerSession *SingleC lastQosExcellence = &qosEx } publicProviderAddress := consumerSession.Parent.PublicLavaAddress + publicProviderEndpoint := consumerSession.Parent.Endpoints[0].NetworkAddress go func() { - csm.consumerMetricsManager.SetQOSMetrics(chainId, apiInterface, publicProviderAddress, lastQos, lastQosExcellence, consumerSession.LatestBlock, consumerSession.RelayNum, relayLatency, sessionSuccessful) + csm.consumerMetricsManager.SetQOSMetrics(chainId, apiInterface, publicProviderAddress, publicProviderEndpoint, lastQos, lastQosExcellence, consumerSession.LatestBlock, consumerSession.RelayNum, relayLatency, sessionSuccessful) }() } diff --git a/protocol/metrics/consumer_metrics_manager.go b/protocol/metrics/consumer_metrics_manager.go index 4cffde8611..e6f45959af 100644 --- a/protocol/metrics/consumer_metrics_manager.go +++ b/protocol/metrics/consumer_metrics_manager.go @@ -169,7 +169,7 @@ func NewConsumerMetricsManager(options ConsumerMetricsManagerOptions) *ConsumerM latestBlockMetric := prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "lava_consumer_latest_provider_block", Help: "The latest block reported by provider", - }, []string{"spec", "provider_address", "apiInterface"}) + }, []string{"spec", "provider_address", "apiInterface", "provider_endpoint"}) latestProviderRelay := prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "lava_consumer_latest_provider_relay_time", @@ -449,7 +449,7 @@ func (pme *ConsumerMetricsManager) getKeyForProcessingLatency(chainId string, ap return header + "_" + chainId + "_" + apiInterface } -func (pme *ConsumerMetricsManager) SetQOSMetrics(chainId string, apiInterface string, providerAddress string, qos *pairingtypes.QualityOfServiceReport, qosExcellence *pairingtypes.QualityOfServiceReport, latestBlock int64, relays uint64, relayLatency time.Duration, sessionSuccessful bool) { +func (pme *ConsumerMetricsManager) SetQOSMetrics(chainId string, apiInterface string, providerAddress string, providerEndpoint string, qos *pairingtypes.QualityOfServiceReport, qosExcellence *pairingtypes.QualityOfServiceReport, latestBlock int64, relays uint64, relayLatency time.Duration, sessionSuccessful bool) { if pme == nil { return } @@ -509,7 +509,7 @@ func (pme *ConsumerMetricsManager) SetQOSMetrics(chainId string, apiInterface st setMetricsForQos(qos, pme.qosMetric, apiInterface) setMetricsForQos(qosExcellence, pme.qosExcellenceMetric, "") // it's one for all of them - pme.LatestBlockMetric.WithLabelValues(chainId, providerAddress, apiInterface).Set(float64(latestBlock)) + pme.LatestBlockMetric.WithLabelValues(chainId, providerAddress, apiInterface, providerEndpoint).Set(float64(latestBlock)) } func (pme *ConsumerMetricsManager) SetVirtualEpoch(virtualEpoch uint64) {