open-telemetry / open-telemetry/opentelemetry-java-instrumentation
Resource name quantization using OTel SDK’s for java microservices
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1.2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 228
Description
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.
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced MappingResolver.java section in the servlet instrumentation bootstrap module, then reproduce the span names with Java auto-instrumentation version 2.16.0. Compare the observed names with the original application paths and the behavior shown in Grafana Tempo. Done means determining whether full names or a controlling flag are supported and documenting the required change or configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100