newrelic / newrelic/newrelic-java-agent
ServletRequestListener metrics get labeled as javax even for new Jakarta implementations
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 240
- Forks
- 170
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
Description
metrics are currently misnamed for jakarta.servelet.ServletRequestListener as javax.servlet.ServletRequestListner
https://github.com/newrelic/newrelic-java-agent/blob/06c4e2ef4c5c66d5573d294acbf729a943d709e2/newrelic-agent/src/main/java/com/newrelic/agent/Transaction.java#L126
We have a hard coded string for ServletRequestListener on the Transaction object that causes the metric name to be incorrect for jakarta implementations.
Expected Behavior
javax initialized code should have metric names as such.
likewise, jakarta initialized code should have metric names as such
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 in newrelic-agent/src/main/java/com/newrelic/agent/Transaction.java around line 126, where the ServletRequestListener metric name is hard-coded. Check how javax and jakarta implementations are distinguished, then verify that javax retains javax metric names and jakarta receives jakarta metric names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100