Springboot metrics are "duplicated"
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java, spring-boot
- Domain
- observability
Research direction
Reproduce the behavior with the DataDog apm-tutorial-java-host Jersey example and the spring-guides gs-spring-boot complete example using dd-java-agent 1.51.1, then compare their service catalog operations after sending requests. The issue is done when the Spring Boot example no longer presents spring.handler as a duplicate of servlet.request, or the service view behavior is otherwise aligned with the stated expectation.
Written by the indexing model from the issue text.
Description
Tracer Version(s)
1.51.1
Java Version(s)
21
JVM Vendor
Eclipse Adoptium / Temurin
Bug Report
If i run the instrumented example from https://github.com/DataDog/apm-tutorial-java-host (springboot application using jersey annotations for controllers declaration),
java -javaagent:$HOME/Downloads/dd-java-agent-1.51.1.jar -Ddd.trace.sample.rate=1 -Ddd.service=notes -Ddd.env=dev -Ddd.version=0.0.1 -jar target/notes-0.0.1-SNAPSHOT.jar
I get only the servlet.request operation in the service catalog view, see:
If now i run the instrumented example from https://github.com/spring-guides/gs-spring-boot/tree/main/complete (springboot application using springboot annotations),
java -javaagent:$HOME/Downloads/dd-java-agent-1.51.1.jar -Ddd.trace.sample.rate=1 -Ddd.service=gs -Ddd.env=dev -Ddd.version=0.0.1 -jar target/spring-boot-complete-0.0.1-SNAPSHOT.jar
I get servlet.request and spring.handler operations in the service catalog view, see:
The spring.handler metric is somehow a duplicate of the servlet.request operations and leads to noisy service views where one has the feeling that everything is duplicated.
Expected Behavior
I would expect either the spring.handler metric to not be reported by the dd-java-agent or the service view to report only the servlet.request operation and not all
Reproduction Code
- Follow the guide: https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/java/?tab=wget
- run the instrumented application (with dd-java-agent)
- execute some requests to populate notes service
- Login to datadog and goto APM/services page
- Select notes service
- it reports only the servlet.request operation
- Pull https://github.com/spring-guides/gs-spring-boot/tree/main/complete
- package the application
- run the instrumented application (with dd-java-agent)
- execute some requests to populate the service
- Goto service page: servlet.request and spring.handler operations are reported
- Dominant language
- Java
- Stars
- 737
- Forks
- 361
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 173
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.
More from DataDog/dd-trace-java
-
type: feature request
Difficulty 1/5 1-3 hours Newbie friendliness 70/100
DataDog/dd-trace-java#10245 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 62/100
DataDog/dd-trace-java#12608 ·
-
type: bug report
Difficulty 4/5 3-5 days Newbie friendliness 35/100
DataDog/dd-trace-java#12597 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
DataDog/dd-trace-java#12540 · 3 comments · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
DataDog/dd-trace-java#12480 ·
All issues in DataDog/dd-trace-java
Similar issues
-
certification
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Openbug ecr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Needs: Triage Type: Feature request
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2760 ·