Skip to content

Jetty 11 instrumentation sets http.route to /* instead of actual route #13802

@vincentlejeune

Description

@vincentlejeune

Hello OpenTelemetry team,

I'm using the OpenTelemetry Java agent to instrument my Java application, which runs on Jetty 11. I've noticed that all HTTP server spans have the http.route attribute set to /*, regardless of the actual request path. However, the url.path attribute correctly reflects the full request path.

I understand that the Jetty 11 instrumentation is supported, as per the supported libraries documentation. However, it seems that the instrumentation does not capture the specific route patterns, leading to http.route being set to a generic /*.

I attempted to manually instrument the application to set the http.route attribute more accurately. While this approach allows me to set the desired value, it results in duplicate spans in my traces.

Is there a recommended way to have the Jetty 11 instrumentation capture the correct http.route values without resorting to manual instrumentation? Alternatively, is there guidance on how to suppress the automatic spans when adding manual instrumentation to avoid duplication?

Thank you for your assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions