Skip to content

Commit 5427d0c

Browse files
authored
annotate some instrumented methods with @noinline (#616)
1 parent b144449 commit 5427d0c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/Http2.scala

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ private[http] final class Http2Ext(implicit val system: ActorSystem)
7575
val telemetry = TelemetrySpi.create(system)
7676

7777
// TODO: split up similarly to what `Http` does into `serverLayer`, `bindAndHandle`, etc.
78+
@noinline // Not inlined to permit instrumentation to pass params (interface, port) as context to constructed implementation flows
7879
def bindAndHandleAsync(
7980
handler: HttpRequest => Future[HttpResponse],
8081
interface: String, port: Int = DefaultPortForProtocol,

http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/Http2Blueprint.scala

+1
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ private[http] object Http2Blueprint {
296296
* Returns a flow that handles `parallelism` requests in parallel, automatically keeping track of the
297297
* Http2StreamIdHeader between request and responses.
298298
*/
299+
@noinline // Not inlined so that we can instrument the produced flow with e.g. tracing downstream
299300
def handleWithStreamIdHeader(parallelism: Int)(handler: HttpRequest => Future[HttpResponse])(
300301
implicit ec: ExecutionContext): Flow[HttpRequest, HttpResponse, NotUsed] =
301302
Flow[HttpRequest]

0 commit comments

Comments
 (0)