newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
202 stars 143 forks source link

Non-regex SQL checks #1887

Closed kanderson250 closed 5 months ago

kanderson250 commented 5 months ago

This PR incorporates the changes from the custom jar we built to prevent unnecessary regex checks when parsing SQL. A customer had reported latency with r2dbc drivers, and removing the extra regex checks resolved their issue.

Instead of performing a regex check for all operations, we now do a simple String contains on the operation name, before continuing with the match.

codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 88.88889% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 70.68%. Comparing base (a16c459) to head (645037f). Report is 308 commits behind head on main.

Files Patch % Lines
...ewrelic/agent/bridge/datastore/R2dbcOperation.java 88.88% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1887 +/- ## ============================================ - Coverage 70.75% 70.68% -0.08% + Complexity 9930 9877 -53 ============================================ Files 828 828 Lines 39855 39851 -4 Branches 6033 6064 +31 ============================================ - Hits 28201 28170 -31 - Misses 8928 8952 +24 - Partials 2726 2729 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.