akka-http-metrics icon indicating copy to clipboard operation
akka-http-metrics copied to clipboard

Provide support for HTTP/2

Open RustedBones opened this issue 6 years ago • 5 comments

As of today, Akka Http only allows using HTTP2 with bindAndHandleAsync method. Since .recordMetrics returns a flow, I can't use this library with HTTP2 which only takes HttpRequest ⇒ Future[HttpResponse] as handler.

RustedBones avatar Jul 12 '19 17:07 RustedBones

async handler is now part of the API but connections metrics are not supported.

RustedBones avatar Jul 21 '19 12:07 RustedBones

The latest release of Akka HTTP has improvements for HTTP 2. Not sure if it helps

https://doc.akka.io/docs/akka-http/current/release-notes/10.1.x.html#akka-http2-support

bilal-fazlani avatar Jul 24 '19 06:07 bilal-fazlani

Thanks for the notification @bilal-fazlani !

There are no significant changes on the API but I spotted this TODO comment on the Http2Ext that indicates a possible unification with Http API.

At this point the connections metrics could be added for Http2.

RustedBones avatar Jul 26 '19 14:07 RustedBones

Small update on this.

Seems the unification goes the opposite way in akka-http 10.2. It favors the function handler instead of the stream, making it more difficult to access connections metrics

RustedBones avatar Aug 29 '20 11:08 RustedBones

TelemetrySpi has been added to akka-http. akka-http-metrics should provide an implementation

RustedBones avatar Oct 28 '21 18:10 RustedBones