-1

like to know how to make count metrics available for incoming http requests in akka-http. Basically, I'm looking for wrappers for each http endpoint so that I can build metrics for the amount of time it took for each request to complete as well as raise the count of the metric once a request is hit.

I attempted to utilize the akka-http directive to encapsulate each incoming request so that it could disclose the metrics, but I am unable to locate the registery reference to register my metrics.

munish
  • 1
  • Not sure what is exactly your issue. Using a [custom directive](https://doc.akka.io/docs/akka-http/current/routing-dsl/directives/custom-directives.html) and the [prometheus java client](https://github.com/prometheus/client_java) is not enough? do you have some code that is not working as you expect? please edit your post detailing what you expect, what is the actual behavior and if it is possible a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). [how to ask](https://stackoverflow.com/help/how-to-ask) might also help to improve your question – Gastón Schabas Aug 12 '23 at 06:09
  • You might want to open an issue for akka-http to add support for Micrometer's Observation API, here's an example: https://github.com/micronaut-projects/micronaut-micrometer/issues/492 – Jonatan Ivanov Aug 16 '23 at 23:50

0 Answers0