-
Notifications
You must be signed in to change notification settings - Fork 122
Description
Expected Behavior
Hi,
I'm using OPA as an Envoy authz filter with opa-envoy-plugin and can't get to access proper metrics from it. If I understand it well, the plugin does not use HTTP to run queries and metrics against the embed OPA server and therefore the http_request_duration_seconds_bucket does not seem to be enriched throughout time. If I run curl http://localhost:8181/metrics against the side container, I get the proper metrics but with almost no information at all in it:
# HELP http_request_duration_seconds A histogram of duration for requests.
# TYPE http_request_duration_seconds histogram
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="1e-06"} 0
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="5e-06"} 0
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="1e-05"} 0
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="5e-05"} 0
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="0.0001"} 0
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="0.0005"} 79887
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="0.001"} 88664
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="0.01"} 90436
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="0.1"} 90448
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="1"} 90448
http_request_duration_seconds_bucket{code="200",handler="health",method="get",le="+Inf"} 90448
http_request_duration_seconds_sum{code="200",handler="health",method="get"} 30.07359942200008
http_request_duration_seconds_count{code="200",handler="health",method="get"} 90448
Basically this only gives me timing information about the health path, which is not really useful. If I'm right, there should also be metrics about the query path. Is it correct ?
If so, is there a way to get access to timing metrics such as timer_rego_builtin_http_send_ns, timer_rego_query_eval_ns or timer_server_handler_ns that are actually exposed in the logs ?
Thanks in advance