newrelic / newrelic/newrelic-java-agent
R2DBC query execution instrumentation resulting in unclear segment naming and categorization
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 240
- Forks
- 170
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
Description
We're seeing transaction traces exceeding millions of milliseconds in a 'Custom' category segment called 'execute' after starting to use R2DBC.

We're still debugging the issue, could be that the long durations are an issue caused by our application as well, however, it was very confusing that a NewRelic integrated instrumentation is logged as 'Custom'.
I think this issue originates from here:
Where a segment is created with just the name execute.
Expected Behavior
Clearer categorization and naming of the R2DBC query execution.
Your Environment
NewRelic 7.9.0 on OpenJDK 64-Bit Server VM (build 18.0.2+0, mixed mode) using R2DBC(-postgresql) 0.9.1
(Migrate to Jira)
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 at instrumentation/r2dbc-postgresql/src/main/java/io/r2dbc/postgresql/R2dbcUtils.java around line 23 and inspect how the execute segment is created. Compare the current segment name and category with the requested clearer R2DBC query execution labeling; done means the instrumentation no longer appears as an ambiguously named Custom execute segment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, postgresql
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100