diff --git a/proxy/manager.go b/proxy/manager.go index 9cdcf43..eda7389 100644 --- a/proxy/manager.go +++ b/proxy/manager.go @@ -15,6 +15,7 @@ import ( "github.com/fosrl/newt/internal/telemetry" "github.com/fosrl/newt/logger" "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" "golang.zx2c4.com/wireguard/tun/netstack" "gvisor.dev/gvisor/pkg/tcpip/adapters/gonet" ) diff --git a/websocket/client.go b/websocket/client.go index 1f4dc49..5a7e91f 100644 --- a/websocket/client.go +++ b/websocket/client.go @@ -313,7 +313,7 @@ func (c *Client) getToken() (string, error) { telemetry.IncConnError(context.Background(), "auth", bin) // Reconnect reason mapping for auth failures if resp.StatusCode == http.StatusUnauthorized || resp.StatusCode == http.StatusForbidden { - telemetry.IncReconnect(context.Background(), c.config.ID, telemetry.ReasonAuthError) + telemetry.IncReconnect(context.Background(), c.config.ID, "client", telemetry.ReasonAuthError) } return "", fmt.Errorf("failed to get token with status code: %d, body: %s", resp.StatusCode, string(body)) }