fix: update IncReconnect for auth failures; import metric in proxy manager for observable callback

This commit is contained in:
Marc Schäfer
2025-10-08 00:32:39 +02:00
parent d74065a71b
commit 75d5e695d6
2 changed files with 2 additions and 1 deletions

View File

@@ -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))
}