Closed flavio closed 3 years ago
The PR https://github.com/kubewarden/policy-server/pull/108 already includes an answer to this question I think.
We have defined two metrics -- policy evaluation counter and policy evaluation latency.
We have settled on opentelemetry with the OTLP protocol in the policy-server side, so we can deploy the opentelemetry-collector as a sidecar along with the policy-server. Then the opentelemetry-collector can be configured to either:
As we have discussed, we believe embracing opentelemetry is the way to go. Because we instrument our code once with opentelemetry-rust, and then the collectors either acting as agent, or gateway, or both, can be configured as desired. If they eventually support other backends in the future we will gain this for free.
The goal is to have each PolicyServer instance expose metrics about the policies currently loaded.
The metrics should be exported as a prometheus endpoint.
TODO: