Skip to content

Resource name quantization using OTel SDK’s for java microservices #14970

@ashishthakur55525

Description

@ashishthakur55525

Describe the bug

Resource name quantization using OTel SDK’s for java microservices. We have seen using OTEL auto instrumentation for Java our resource or span name are truncated or thats how OTEL produce it.
For example if these are span names ( we have these showed when we used Datadog agent auto instrumentation
for tracing)

POST //securitysystems/listjson
GET /<appname/navigation/banner
POST /<appname/api/login
POST /<appname/flatViewJobcontrol/flatViewJobControlDatatable

Then via OTEL auto instrumentation it will be like this, it add wildcard in the end and we are not able to see whats the full path.

GET //*
GET //.dispatch
POST //
.images
POST //*

After doing some research on this and checking with Datadog as well lik why we have difference when we use OTEL SDK vs Datadog agent for tracing auto instrumentation then this came up that OTEL SDK is designed like that to have quantization in place.

https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/servlet/servlet-common/bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/servlet/MappingResolver.java#L58-L95

So would like to confirm if there is possibility to bypass this and have full span or resource name displayed?

Steps to reproduce

Just use java auto instrumentation for any java micro services.. you will see this trend there in span names.

Expected behavior

We wanted to see full span name like original\raw how it is in application or also is there way if we can control this behaviour using some flag.

Actual behavior

We are seeing that resource name is truncated when we see traces in Grafana Tempo.

Javaagent or library instrumentation version

2.16.0

Environment

JDK:
OS:

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageNew issue that requires triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions