You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working with the metrics middleware, we noticed that all the error codes showing up in Prometheus were HTTP status codes (400, 504, etc) even though only the gRPC endpoints were being exercised, which surprised us at first, but it looks like all the middlewares behave this way:
Kratos errors are declared with an HTTP status code [link]
And middlewares use this code field directly (metrics, logging)
Which left us wondering: is this intentional behavior? It seems like it could be meant to abstract logged error codes from the actual protocol used, maybe favoring HTTP because it's more widely recognized, but we wanted to reach out and check.
We also noticed that OK responses are logged as 0, which would be the correct status code for gRPC but is inconsistent with the HTTP ones and likely just an empty value.
The text was updated successfully, but these errors were encountered:
While working with the metrics middleware, we noticed that all the error codes showing up in Prometheus were HTTP status codes (400, 504, etc) even though only the gRPC endpoints were being exercised, which surprised us at first, but it looks like all the middlewares behave this way:
Which left us wondering: is this intentional behavior? It seems like it could be meant to abstract logged error codes from the actual protocol used, maybe favoring HTTP because it's more widely recognized, but we wanted to reach out and check.
We also noticed that OK responses are logged as 0, which would be the correct status code for gRPC but is inconsistent with the HTTP ones and likely just an empty value.
The text was updated successfully, but these errors were encountered: