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
Vert.x Web instrumentation #1697
Vert.x Web instrumentation #1697
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A first pass on this. Looks pretty good so far 👏
...x-3_6-plugin/src/main/java/co/elastic/apm/agent/vertx_3_6/VertxEventLoopInstrumentation.java
Outdated
Show resolved
Hide resolved
...x-3_6-plugin/src/main/java/co/elastic/apm/agent/vertx_3_6/VertxEventLoopInstrumentation.java
Outdated
Show resolved
Hide resolved
.../apm-vertx-3_6-plugin/src/main/java/co/elastic/apm/agent/vertx_3_6/Http1Instrumentation.java
Outdated
Show resolved
Hide resolved
...m-vertx-3_6-plugin/src/main/java/co/elastic/apm/agent/vertx_3_6/VertxWebInstrumentation.java
Outdated
Show resolved
Hide resolved
...x-3_6-plugin/src/main/java/co/elastic/apm/agent/vertx_3_6/wrapper/GenericHandlerWrapper.java
Outdated
Show resolved
Hide resolved
...s/apm-vertx/apm-vertx-common/src/main/java/co/elastic/apm/agent/vertx/NettyByteTransfer.java
Outdated
Show resolved
Hide resolved
...s/apm-vertx/apm-vertx-common/src/main/java/co/elastic/apm/agent/vertx/NettyByteTransfer.java
Outdated
Show resolved
Hide resolved
...s/apm-vertx/apm-vertx-common/src/main/java/co/elastic/apm/agent/vertx/NettyByteTransfer.java
Outdated
Show resolved
Hide resolved
...s/apm-vertx/apm-vertx-common/src/main/java/co/elastic/apm/agent/vertx/NettyByteTransfer.java
Outdated
Show resolved
Hide resolved
...apm-vertx-3_6-plugin/src/main/java/co/elastic/apm/agent/vertx_3_6/helper/VertxWebHelper.java
Outdated
Show resolved
Hide resolved
.../apm-vertx-3_6-plugin/src/main/java/co/elastic/apm/agent/vertx_3_6/Http1Instrumentation.java
Outdated
Show resolved
Hide resolved
...x-3_6-plugin/src/main/java/co/elastic/apm/agent/vertx_3_6/wrapper/GenericHandlerWrapper.java
Outdated
Show resolved
Hide resolved
...x-3_6-plugin/src/main/java/co/elastic/apm/agent/vertx_3_6/wrapper/GenericHandlerWrapper.java
Outdated
Show resolved
Hide resolved
...x/apm-vertx-4-plugin/src/main/java/co/elastic/apm/agent/vertx_4/VertxWebInstrumentation.java
Outdated
Show resolved
Hide resolved
...x/apm-vertx-common/src/main/java/co/elastic/apm/agent/vertx/MultiMapHeadersGetterSetter.java
Outdated
Show resolved
Hide resolved
...vertx-4-plugin/src/main/java/co/elastic/apm/agent/vertx_4/VertxEventLoopInstrumentation.java
Outdated
Show resolved
Hide resolved
...tx-common/src/main/java/co/elastic/apm/agent/vertx/AbstractRoutingContextHandlerWrapper.java
Outdated
Show resolved
Hide resolved
5bdf34f
to
88be895
Compare
…test reliability.
…agent-java into vertx-instrumentation
…agent-java into vertx-instrumentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
...apm-vertx-common/src/main/java/co/elastic/apm/agent/vertx/AbstractHttpTransactionHelper.java
Show resolved
Hide resolved
import io.vertx.core.spi.tracing.VertxTracer; | ||
import io.vertx.core.tracing.TracingPolicy; | ||
|
||
class NoopVertxTracer implements VertxTracer<Object, Object> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[minor] We could simply reuse the io.vertx.core.spi.tracing.VertxTracer#NOOP
constant instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, missed there is a NOOP tracer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to do the same with the io.vertx.core.spi.tracing.VertxTracer#NOOP
tracer. Unfortunately, NOOP
is returning null as the trace object so that the corresponding sendResponse
method of the traces isn't called at all.
--> We need to use our own NoopVertxTracer!
|
||
@Override | ||
public final ElementMatcher<? super TypeDescription> getTypeMatcher() { | ||
return hasSuperType(named("io.vertx.core.spi.tracing.VertxTracer")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question] Does it means we instrument any existing tracer if there is any and if there is none we inject our own no-op which comes not-so-no-op anymore once it's instrumented ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case if you have time to add a minor comment to explain that a bit and make it more obvious that would really be nice. I'm not sure that I'll remember that trick in a few months :-).
Provides Instrumentation for Vertx.x Web / HttpServer and Context propagation into Vert.x event engine.