Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Rename some metrics
Browse files Browse the repository at this point in the history
Mimic the naming scheme of mautrix-whatsapp metrics
  • Loading branch information
AndrewFerr committed Feb 22, 2024
1 parent 726e6ef commit 8710b6c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type MetricsHandler struct {

func NewMetricsHandler(address string, log zerolog.Logger, db *database.Database) *MetricsHandler {
portalCount := promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "bridge_portals_total",
Name: "signal_portals_total",
Help: "Number of portal rooms on Matrix",
}, []string{"type", "encrypted"})
return &MetricsHandler{
Expand All @@ -88,19 +88,19 @@ func NewMetricsHandler(address string, log zerolog.Logger, db *database.Database
Help: "Time spent processing Signal messages",
}, []string{"message_type"}),
countCollection: promauto.NewHistogram(prometheus.HistogramOpts{
Name: "bridge_count_collection",
Name: "signal_count_collection",
Help: "Time spent collecting the bridge_*_total metrics",
}),
puppetCount: promauto.NewGauge(prometheus.GaugeOpts{
Name: "bridge_puppets_total",
Name: "signal_puppets_total",
Help: "Number of Signal users bridged into Matrix",
}),
userCount: promauto.NewGauge(prometheus.GaugeOpts{
Name: "bridge_users_total",
Name: "signal_users_total",
Help: "Number of Matrix users using the bridge",
}),
messageCount: promauto.NewGauge(prometheus.GaugeOpts{
Name: "bridge_messages_total",
Name: "signal_messages_total",
Help: "Number of messages bridged",
}),
portalCount: portalCount,
Expand Down

0 comments on commit 8710b6c

Please sign in to comment.