Describe the bug
I created a reproducible repo: here
When you have the following router configuration (recommended by Vertx in its docs)
Router restAPI = Router.router(vertx);
restAPI.get("/products/:productID").handler(ctx -> {
// TODO Handle the lookup of the product....
ctx.response().end();
});
restAPI.put("/products/:productID").handler(ctx -> {
// TODO Add a new product...
ctx.response().end();
});
restAPI.delete("/products/:productID").handler(ctx -> {
// TODO delete the product...
ctx.response().end();
});
Router mainRouter = Router.router(vertx);
mainRouter.route("/productsAPI/*").handler(k -> {
// some logic (e.g. auth check) before passing the request to the subrouter
k.next();
});
mainRouter.route("/productsAPI/*")
.subRouter(restAPI);
It results in a span name: GET /productsAPI/productsAPI/products/:productID. Even though the actual route is /productsAPI/products/:productID.
Steps to reproduce
Checkout the above repo or create a new vertx project with the above routing configuration
1a. The following environment variables are set:
What did you see instead?
io.opentelemetry.exporter.logging.LoggingSpanExporter - 'GET /productsAPI/productsAPI/products/:productID'
What version and what artifacts are you using?
pom.xml
vertx: 4.5.10
opentelemtry java agent: 2.7.0
Environment
Running locally for now, on macOS
Additional context
All RoutingHandlers are wrapped by autoinstrumentation and this results in every RoutingHandler being appending the path. Within RoutingContextHandlerWrapper this line is responsible for the behavior.
Describe the bug I created a reproducible repo: here
When you have the following router configuration (recommended by Vertx in its docs)
It results in a span name:
GET /productsAPI/productsAPI/products/:productID
. Even though the actual route is/productsAPI/products/:productID
.Steps to reproduce
curl http://localhost:8888/productsAPI/products/3
What did you expect to see?
What did you see instead? io.opentelemetry.exporter.logging.LoggingSpanExporter - 'GET /productsAPI/productsAPI/products/:productID'
What version and what artifacts are you using? pom.xml vertx: 4.5.10 opentelemtry java agent: 2.7.0
Environment Running locally for now, on macOS
Additional context All RoutingHandlers are wrapped by autoinstrumentation and this results in every RoutingHandler being appending the path. Within RoutingContextHandlerWrapper this line is responsible for the behavior.