1

We are using micrometer-prometheus-registry, metrics are coming fine but for 404 not found exceptions on service we are getting:

http_server_requests_seconds_count{exception="None",method="GET",outcome="CLIENT_ERROR",status="404",uri="/**",} 1.0

any idea what we might be missing here?

Ahsan Naseem
  • 1,046
  • 1
  • 19
  • 38

1 Answers1

2

This is by design. Since Prometheus tags are kept in memory for the duration of the application runtime each 404 request for a new URL would create a new tag and eventually the application could run out of memory.

You would want to log the 404 detail instead of tracking those via Prometheus and use the 404 metric to track the number of calls in aggregate.

checketts
  • 14,167
  • 10
  • 53
  • 82