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

Refactor vertx-web to weave Http2ServerConnection #1959

Merged
merged 1 commit into from
Jun 26, 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
@@ -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();
}

}
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();
}

}
Loading