lchenn / py-grpc-prometheus

Python gRPC Prometheus
Apache License 2.0
48 stars 25 forks source link

Server non-RPC exceptions are not logged as StatusCode.INTERNAL grpc_code #29

Open MrNeocore opened 3 years ago

MrNeocore commented 3 years ago

Whenever the server's RPC implementation fails to process a query (say, due to a KeyError), no metric is generated.

It would seem natural to me to generate such metric: grpc_server_handled_total{grpc_code="StatusCode.INTERNAL",grpc_method="METHOD",grpc_service="SERVICE",grpc_type="TYPE"} <N>

amirkhonov commented 1 year ago

up

amirkhonov commented 1 year ago

grpc_server_handled_total is counting only OK responses, not failures.