Parcourir la source

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 il y a 1 mois
Parent
commit
549d1e3c83
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  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