newrelic / newrelic/newrelic-java-agent

ServletRequestListener metrics get labeled as javax even for new Jakarta implementations

Open
#1,309 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3 breaking-change medium
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.