-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access metrics from opa-envoy-plugin via HTTP metrics API #648
Comments
There are metrics reported in the decision log entries, like this:
Note the
which would also include the Does that help? |
Hi @srenatus, Thanks for your answer. Actually I'm aware of those metrics being reported in the decision logs. However, I'm trying to get Prometheus to scrape metrics that need to be exposed through an HTTP endpoint and in the right format. I was then expecting that the Do you know how I could get those metrics to Prometheus ? Thanks in advance. |
The Prometheus metrics OPA provides are for the http handler. For the |
Hmm I think having an endpoint to scrape the OPA-specific metrics from an opa-envoy-plugin instance isn't an unreasonable expectation.... what would it take to expose the metrics currently pushed through the DL via the (well-known, documented) metrics HTTP endpoint? 🤔 |
@ashutosh-narkar Thanks for your message. Yes that is exactly what I supposed, that those metrics were only http related. Regarding Envoy, metrics exposed from the Istio sidecar in my case do not seem to include anything relative to the authz_filter, but only the whole request itself. Then we can actually get those allowed/denied requests, but not the duration buckets for the envoy filter itself. However I'm pretty new to the Envoy/Istio so I might be wrong. Having the whole set of OPA related metrics being exposed through HTTP as @srenatus stated would be really awesome. Also not relying on Envoy would allow more granularity in terms of what is being exported I guess. |
Hi, we just wanted to know if the following issue would be addressed in the near future. This is an important requirement for us because our Site Reliability Engineering is mandating us to expose the OPA metrics before we can have it in production. So, we at least want to know that it could be addressed in the coming few weeks.. and also request you to prioritize it if you didn't plan for it earlier. |
@LionOnTheChase if you would like to contribute this feature, we'd be happy to guide you. |
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. |
We have been working around this problem by relying on decision logs for observability data . It turned out that due to high load , the amount of decision logs being generated are consuming high disk usage. We need to turn off the decision logs but if we do that we will lose all observability built on decision logs. So, if this enhancement can be added, we can afford to switch of the decision logs and still have observability on OPA service. Sorry, I don't have the expertise to assist on this PR. |
@LionOnTheChase thanks for the insight.
Decision logs are not persisted to disk. They are in-memory. You can control that via |
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue. |
Thanks @ashutosh-narkar . Will get back to you once I do some initial research. |
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue. |
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 thehttp_request_duration_seconds_bucket
does not seem to be enriched throughout time. If I runcurl http://localhost:8181/metrics
against the side container, I get the proper metrics but with almost no information at all in it: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
ortimer_server_handler_ns
that are actually exposed in the logs ?Thanks in advance
The text was updated successfully, but these errors were encountered: