Skip to content

Commit

Permalink
refactor: improved prometheus metrics (#1830)
Browse files Browse the repository at this point in the history
This will add new prometheus metrics for Kratos that are more useful for alerting and increase overall observability.

BREAKING CHANGES: This patch changes the naming and number of prometheus metrics (see: ory/x#379). In short: all metrics will have now `http_` prefix to conform to Prometheus best practices.

Closes #1735
  • Loading branch information
aeneasr committed Oct 12, 2021
1 parent 29c060b commit 0be993b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/registry_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ func (m *RegistryDefault) PrometheusManager() *prometheus.MetricsManager {
m.rwl.Lock()
defer m.rwl.Unlock()
if m.pmm == nil {
m.pmm = prometheus.NewMetricsManager("kratos", m.buildVersion, m.buildHash, m.buildDate)
m.pmm = prometheus.NewMetricsManagerWithPrefix("kratos", prometheus.HTTPMetrics, m.buildVersion, m.buildHash, m.buildDate)
}
return m.pmm
}

0 comments on commit 0be993b

Please sign in to comment.