소스 검색

fix(metrics): register NATSPublishTotal with prometheus

The previous commit added the NATSPublishTotal field to the
IngestdMetrics struct and the constructor, but forgot to add
it to the reg.MustRegister() call. Counter vec created with
prometheus.NewCounterVec is not auto-registered; it must be
explicitly passed to MustRegister (or Register) on the
prometheus.Registerer.

Without this, the metric is created in memory but never
exposed via /metrics, so neither the smoke assertion nor the
new PromQL alert can see it.
Luis Rosales 1 개월 전
부모
커밋
549d1e3
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      internal/observability/metrics.go

+ 2 - 0
internal/observability/metrics.go

@@ -241,6 +241,8 @@ func NewIngestdMetrics(reg prometheus.Registerer, serviceName string) *IngestdMe
 		m.GRPCInflight,
 		m.GRPCRateLimited,
 		m.GRPCAckLatency,
+		// F2: NATS publish outcome (M11 NATS investigation)
+		m.NATSPublishTotal,
 	)
 	m.AlertsReceived.WithLabelValues("internal", "accepted")
 	return m