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

Commit

Permalink
Remove unused "bridge_signal_request" metric
Browse files Browse the repository at this point in the history
as this metric is less useful now that the Signal event handler doesn't
directly monitor/return errors anymore
  • Loading branch information
AndrewFerr committed Feb 23, 2024
1 parent 98bfd18 commit bbf267e
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type MetricsHandler struct {
puppetCount prometheus.Gauge
activePuppetCount prometheus.Gauge
bridgeBlocked prometheus.Gauge
requestCount *prometheus.CounterVec
userCount prometheus.Gauge
messageCount prometheus.Gauge
portalCount *prometheus.GaugeVec
Expand Down Expand Up @@ -109,10 +108,6 @@ func NewMetricsHandler(address string, log zerolog.Logger, db *database.Database
Name: "bridge_blocked",
Help: "Is the bridge currently blocking messages",
}),
requestCount: promauto.NewCounterVec(prometheus.CounterOpts{
Name: "bridge_signal_request",
Help: "The results of signal request processing",
}, []string{"result", "type"}),
userCount: promauto.NewGauge(prometheus.GaugeOpts{
Name: "signal_users_total",
Help: "Number of Matrix users using the bridge",
Expand Down Expand Up @@ -204,19 +199,6 @@ func (mh *MetricsHandler) TrackConnectionState(signalID uuid.UUID, connected boo
}
}

func (mh *MetricsHandler) TrackRequest(counterType string, success bool) {
var result string
if success {
result = "success"
} else {
result = "error"
}
mh.requestCount.With(prometheus.Labels{
"type": counterType,
"result": result,
}).Inc()
}

func (mh *MetricsHandler) updateStats() {
start := time.Now()
var puppetCount int
Expand Down

0 comments on commit bbf267e

Please sign in to comment.