Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotate some instrumented methods with @noinline #616

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading