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

Vert.x Web instrumentation #1697

Merged
merged 26 commits into from May 5, 2021

Conversation

AlexanderWert
Copy link
Member

Provides Instrumentation for Vertx.x Web / HttpServer and Context propagation into Vert.x event engine.

@apmmachine
Copy link
Collaborator

apmmachine commented Mar 12, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #1697 updated

  • Start Time: 2021-05-05T07:10:51.788+0000

  • Duration: 58 min 51 sec

  • Commit: b9833df

Test stats 🧪

Test Results
Failed 0
Passed 2126
Skipped 19
Total 2145

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 2126
Skipped 19
Total 2145

Copy link
Member

@felixbarny felixbarny left a 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 👏

@SylvainJuge SylvainJuge self-assigned this Mar 15, 2021
@AlexanderWert AlexanderWert marked this pull request as ready for review March 17, 2021 15:46
@AlexanderWert AlexanderWert added this to the 7.13 milestone Mar 29, 2021
@cyrille-leclerc cyrille-leclerc modified the milestones: 7.13, 7.14 Apr 13, 2021
Copy link
Member

@SylvainJuge SylvainJuge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

import io.vertx.core.spi.tracing.VertxTracer;
import io.vertx.core.tracing.TracingPolicy;

class NoopVertxTracer implements VertxTracer<Object, Object> {
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member Author

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"))
Copy link
Member

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 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly

Copy link
Member

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 :-).

@AlexanderWert AlexanderWert merged commit 04ae148 into elastic:master May 5, 2021
APM-Agents (OLD) automation moved this from In Progress to Done May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants