aerogear / keycloak-metrics-spi

Adds a Metrics Endpoint to Keycloak
Apache License 2.0
549 stars 156 forks source link

Filter URI's for keycloak_response_total and keycloak_response_errors #130

Open r2c2 opened 2 years ago

r2c2 commented 2 years ago

Description

Currently every request that reaches the keycloak server is included in the metrics for keycloak_response_total and keycloak_response_errors , this includes invalid URI's.

If a bot is scraping the keycloak endpoint all the URIs are being exported to prometheus.

Expected Behavior

Add a filter like URI_METRICS_FILTER that records only the URI's that are relevant for metrics

Actual Behavior

All the requests to the keycloak server are exported to prometheus

Environment

Steps to reproduce

  1. Invoke an invalid URI in the keycloak server
  2. The URI is recorded and available to be exported to prometheus