Skip to content

Commit

Permalink
Don't log errors for not implemented grpc metrics (#6125)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjngx committed Aug 7, 2024
1 parent bf14874 commit 6826a5f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions internal/metrics/collectors/latency.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@ func (l *LatencyMetricsCollector) RecordLatency(syslogMsg string) {
glog.V(3).Infof("could not parse syslog message: %v", err)
return
}

// Upstream for gRPC service is not implemented yet.
// This is a temp solution to avoid spamming error logs.
// Ref:
// https://github.com/nginxinc/kubernetes-ingress/issues/5010
// https://github.com/nginxinc/kubernetes-ingress/issues/6124
if lm.Upstream == "-" {
glog.V(3).Infof("latency metrics for gRPC upstreams: %v", lm)
return
}

labelValues, err := l.createLatencyLabelValues(lm)
if err != nil {
glog.Errorf("cannot record latency for upstream %s and server %s: %v", lm.Upstream, lm.Server, err)
Expand Down

0 comments on commit 6826a5f

Please sign in to comment.