diff --git a/cmd/mc-router/metrics.go b/cmd/mc-router/metrics.go index dfc6bf3..e3c9999 100644 --- a/cmd/mc-router/metrics.go +++ b/cmd/mc-router/metrics.go @@ -105,9 +105,9 @@ func (b *influxMetricsBuilder) BuildConnectorMetrics() *server.ConnectorMetrics b.metrics = metrics return &server.ConnectorMetrics{ - Errors: metrics.NewCounter("errors"), - BytesTransmitted: metrics.NewCounter("transmitted_bytes"), - Connections: metrics.NewCounter("connections"), - ActiveConnections: metrics.NewGauge("connections_active"), + Errors: metrics.NewCounter("mc_router_errors"), + BytesTransmitted: metrics.NewCounter("mc_router_transmitted_bytes"), + Connections: metrics.NewCounter("mc_router_connections"), + ActiveConnections: metrics.NewGauge("mc_router_connections_active"), } } diff --git a/server/connector.go b/server/connector.go index bce9c52..2d8f868 100644 --- a/server/connector.go +++ b/server/connector.go @@ -78,7 +78,7 @@ func (c *connectorImpl) acceptConnections(ctx context.Context, ln net.Listener, } func (c *connectorImpl) HandleConnection(ctx context.Context, frontendConn net.Conn) { - c.metrics.Connections.With("direction", "frontend").Add(1) + c.metrics.Connections.With("side", "frontend").Add(1) //noinspection GoUnhandledErrorResult defer frontendConn.Close() @@ -185,7 +185,7 @@ func (c *connectorImpl) findAndConnectBackend(ctx context.Context, frontendConn return } - c.metrics.Connections.With("direction", "backend", "host", resolvedHost).Add(1) + c.metrics.Connections.With("side", "backend", "host", resolvedHost).Add(1) c.metrics.ActiveConnections.Add(1) defer c.metrics.ActiveConnections.Add(-1)