Hi team, is there a metrics endpoint for server an...
# opal
p
Hi team, is there a metrics endpoint for server and clients?
a
Hi @Prasenjit Roy, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
Yes, there are metrics endpoints available. For the *PDP (Policy Decision Point) *, you can access performance metrics through: (1)
Copy code
http://localhost:7766/metrics
This endpoint allows you to monitor request latency, decision counts, cache hit rates, and error rates. For ​*OPAL Server*​, there's a statistics endpoint available: (2)
Copy code
GET /statistics
This returns server statistics including uptime and connected clients information. Note that for the PDP metrics endpoint, you can configure authentication using the
PDP_ALLOW_METRICS_UNAUTHENTICATED
environment variable - setting it to
True
makes the
/metrics
endpoint accessible without authentication. (3) Regarding Prometheus metrics specifically, this is a feature that was requested for OPAL Server and Client components, though the implementation status would need to be verified with the latest documentation. (5)
To learn more, see the sources I considered: [[1] Run Local Authorization Microservice | Permit.io Documentation](https://docs.permit.io/overview/local-authorization-microservice) [[2] GET /statistics](https://opal-v2.permit.io/redoc#tag/Server-Statistics/operation/get_statistics_statistics_get) [[3] Configurations](https://docs.permit.io/concepts/pdp/configuration)
p
Is open telemetry available in opal.?
@Ask Inkeep
a
Thanks for tagging me @Prasenjit Roy. I'll look through relevant sources and get back to you shortly.
Yes, OpenTelemetry is available in OPAL, though with some specific considerations. According to the documentation, OPAL provides OpenTelemetry metrics (1) . However, there's an important detail: the OpenTelemetry metrics endpoint includes pubsub active clients and client data subscriptions, which can make the responses very large . There's an open feature request from February 2025 to add the ability to exclude the verbose pubsub client data from the metrics using an
INCLUDE_PUBSUB_METRICS
option that could be toggled on or off . The monitoring documentation also mentions that OPAL supports multiple monitoring approaches including logs, health-checks, callbacks, and statistics (2) , though it doesn't provide extensive details about OpenTelemetry configuration specifics.
To learn more, see the sources I considered: [[1] Ability to exclude pubsub data from the OpenTelemetry metrics](https://github.com/permitio/opal/issues/757) [[2] Monitoring OPAL](https://docs.opal.ac/tutorials/monitoring_opal)
o
No, the AI is confused The Open-telemetry PR has been reverted due to stability issues
p
Ohk. Is there any way to configure metrics?
OPAL_ENABLE_METRICS=true throws this error Tracer.configure() got an unexpected keyword argument ' settings '
o
What's available is listed here - https://opal.ac/tutorials/monitoring_opal In addition you can apply monitoring on your policy enegine directly (e.g. OPA, which does support open-telemtry)
p
I tried enabling it from that page. I see the above tracer error.
o
There's no such thing on that page
p
Oh, yes sorry, i think i found it tracing the code. Thanks I'll configure OPA instead.