-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1959 from newrelic/vertx-http2
Refactor vertx-web to weave Http2ServerConnection
- Loading branch information
Showing
2 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
12 changes: 6 additions & 6 deletions
12
...tp1xServerConnection_Instrumentation.java → ...HttpServerConnection_Instrumentation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
/* | ||
* | ||
* * Copyright 2020 New Relic Corporation. All rights reserved. | ||
* * Copyright 2024 New Relic Corporation. All rights reserved. | ||
* * SPDX-License-Identifier: Apache-2.0 | ||
* | ||
*/ | ||
|
||
package io.vertx.core.http.impl; | ||
|
||
import com.newrelic.api.agent.weaver.MatchType; | ||
import com.newrelic.api.agent.weaver.Weave; | ||
import com.newrelic.api.agent.weaver.Weaver; | ||
import com.nr.vertx.instrumentation.VertxUtil; | ||
import io.vertx.core.Handler; | ||
import io.vertx.core.http.HttpServerRequest; | ||
|
||
@Weave(originalName = "io.vertx.core.http.impl.Http1xServerConnection") | ||
public class Http1xServerConnection_Instrumentation { | ||
|
||
// This interface has HTTP/1 and HTTP/2 implementations | ||
@Weave(type = MatchType.Interface, originalName = "io.vertx.core.http.impl.HttpServerConnection") | ||
public abstract class HttpServerConnection_Instrumentation { | ||
public HttpServerConnection handler(Handler<HttpServerRequest> handler) { | ||
if (handler != null) { | ||
// Wrap the request handler so we can start the transaction and start tracking child threads | ||
// Wrap the request handler, so we can start the transaction and start tracking child threads | ||
handler = VertxUtil.wrapRequestHandler(handler); | ||
} | ||
return Weaver.callOriginal(); | ||
} | ||
|
||
} |
12 changes: 6 additions & 6 deletions
12
...tp1xServerConnection_Instrumentation.java → ...HttpServerConnection_Instrumentation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
/* | ||
* | ||
* * Copyright 2020 New Relic Corporation. All rights reserved. | ||
* * Copyright 2024 New Relic Corporation. All rights reserved. | ||
* * SPDX-License-Identifier: Apache-2.0 | ||
* | ||
*/ | ||
|
||
package io.vertx.core.http.impl; | ||
|
||
import com.newrelic.api.agent.weaver.MatchType; | ||
import com.newrelic.api.agent.weaver.Weave; | ||
import com.newrelic.api.agent.weaver.Weaver; | ||
import com.nr.vertx.instrumentation.VertxUtil; | ||
import io.vertx.core.Handler; | ||
import io.vertx.core.http.HttpServerRequest; | ||
|
||
@Weave(originalName = "io.vertx.core.http.impl.Http1xServerConnection") | ||
public class Http1xServerConnection_Instrumentation { | ||
|
||
// This interface has HTTP/1 and HTTP/2 implementations | ||
@Weave(type = MatchType.Interface, originalName = "io.vertx.core.http.impl.HttpServerConnection") | ||
public abstract class HttpServerConnection_Instrumentation { | ||
public HttpServerConnection handler(Handler<HttpServerRequest> handler) { | ||
if (handler != null) { | ||
// Wrap the request handler so we can start the transaction and start tracking child threads | ||
// Wrap the request handler, so we can start the transaction and start tracking child threads | ||
handler = VertxUtil.wrapRequestHandler(handler); | ||
} | ||
return Weaver.callOriginal(); | ||
} | ||
|
||
} |