Ruibin Zhang
Ruibin Zhang

Reputation: 1

How can I track retry attempts for each request in Resilience4j?

I am using Resilience4j in my Spring Boot application and I want to track the number of retries that occur for each individual API request (for example, for http://localhost:9080/backendA/success).

I can see general metrics like resilience4j_retry_calls_total, but I need to know how many retries occurred for each specific request, and calculate the average attempts to successfully get a correct request.

How can I achieve this, and expose this data to Prometheus for monitoring?

Now I can only get the four different metrics. what I want is the average, maximum attempts for successful_with_retry.

Would this data be helpful in deciding the maxAttempts configuration for the retry logic, or is there a better way to approach it? If the retry attempts data is not so crucial for setting the maxAttempts, I'd appreciate any advice on how to properly fine-tune this configuration.

Thanks in advance!

Upvotes: 0

Views: 54

Answers (0)

Related Questions