akka/akka-http

Monitoring http client retries

Open

#1,543 opened on Nov 21, 2017

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Scala (1,311 stars) (598 forks)batch import
1 - triageddiscusshelp wantedt:client

Description

We have a use case where we need to know the exact number of requests that we send to the services downstream (due to quota/contractual obligations).

We hoped to leverage akka-http retry mechanism for that (those are all GET requests), however my research shows that there seems to be no way to get retry information at the client level.

Here we still have access to the retriesLeft field of the RequestContext, however it is not propagated to the response that is exposed to the client. I'm not really sure whether there is a solution without a breaking change in the interface, but it's definitely a useful feature to have.

The workaround is to roll my own retries instead.

Contributor guide