newrelic-java-agent
newrelic-java-agent copied to clipboard
R2DBC query execution instrumentation resulting in unclear segment naming and categorization
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:
https://github.com/newrelic/newrelic-java-agent/blob/da8f5509331144d64a7ba33bf41316066e5c7f42/instrumentation/r2dbc-postgresql/src/main/java/io/r2dbc/postgresql/R2dbcUtils.java#L23
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)
@jurriaan thank you for alerting us to this issue - please do keep us posted if your debugging efforts yield more details later on.
While we cannot commit to a date when we'll be able to investigate this further, the more information we have, the better!
@kford-newrelic I do think the R2DBC calls can be tagged a bit better than 'execute' in the category 'Custom' though. It took us quite a while to figure out this was not a custom instrumentation we added ourselves, but instead something that originated from the official newrelic java agent library.
https://issues.newrelic.com/browse/NEWRELIC-4095
Unfortunately we were not able to prioritize this for the Jan-Mar quarter. Will consider for a future quarter.
Any update on this?