Skip to content

Commit

Permalink
annotate some instrumented methods with @noinline (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsimpson authored Oct 10, 2024
1 parent b144449 commit 5427d0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ private[http] final class Http2Ext(implicit val system: ActorSystem)
val telemetry = TelemetrySpi.create(system)

// TODO: split up similarly to what `Http` does into `serverLayer`, `bindAndHandle`, etc.
@noinline // Not inlined to permit instrumentation to pass params (interface, port) as context to constructed implementation flows
def bindAndHandleAsync(
handler: HttpRequest => Future[HttpResponse],
interface: String, port: Int = DefaultPortForProtocol,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ private[http] object Http2Blueprint {
* Returns a flow that handles `parallelism` requests in parallel, automatically keeping track of the
* Http2StreamIdHeader between request and responses.
*/
@noinline // Not inlined so that we can instrument the produced flow with e.g. tracing downstream
def handleWithStreamIdHeader(parallelism: Int)(handler: HttpRequest => Future[HttpResponse])(
implicit ec: ExecutionContext): Flow[HttpRequest, HttpResponse, NotUsed] =
Flow[HttpRequest]
Expand Down

0 comments on commit 5427d0c

Please sign in to comment.