good morning!!!!

Skip to content
Snippets Groups Projects
Commit b7e22c7e authored by Trevor Judice's avatar Trevor Judice
Browse files

remove metric

parent c5b36b8c
No related branches found
No related tags found
No related merge requests found
......@@ -184,7 +184,6 @@ func (g *Gatling) handleConnection(ctx context.Context, c net.Conn) {
err := cl.Accept(ctx)
if err != nil {
metrics.RecordConnectionError(err)
if !errors.Is(err, io.EOF) {
log.Println("err in connection:", err.Error())
_ = cl.Send(pg_error.IntoPacket(err))
......
......@@ -28,10 +28,6 @@ func newGatmetrics() *gatMetrics {
Name: "pggat_connection_count_total",
Help: "total number of connections initiated with pggat",
}),
ConnectionErrorCounter: promauto.NewCounterVec(prometheus.CounterOpts{
Name: "pggat_connection_error_count_total",
Help: "total number of connections initiated with pggat",
}, []string{"error"}),
ActiveConnections: promauto.NewGauge(prometheus.GaugeOpts{
Name: "pggat_current_connection_count",
Help: "number of connections to pggat currently",
......@@ -60,14 +56,3 @@ func RecordActiveConnections(change int) {
g := GatMetrics()
g.ActiveConnections.Add(float64(change))
}
func RecordConnectionError(err error) {
if !On() {
return
}
log.Println(err.Error())
if err != nil {
g := GatMetrics()
g.ConnectionErrorCounter.WithLabelValues(err.Error()).Inc()
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment