newrelic / newrelic-java-agent

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

Add instrumentation for r2dbc-postgresql-0.9.2 #1410

Closed koenpunt closed 1 year ago

koenpunt commented 1 year ago

_Before contributing, please read our contributing guidelines and code of conduct._

Overview

Adds updated instrumentation for r2dbc-postgresql-0.9.2, since instrumentation was disabled in https://github.com/newrelic/newrelic-java-agent/pull/999.

Related Github Issue

Include a link to the related GitHub issue, if applicable

Testing

The agent includes a suite of tests which should be used to verify your changes don't break existing functionality. These tests will run with Github Actions when a pull request is made. More details on running the tests locally can be found here,

Checks

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

koenpunt commented 1 year ago

I tried running the tests locally, but couldn't get that to work, and was hoping to get the workflow running here on CI, but I see that maintainer requires approval.

koenpunt commented 1 year ago

Okay, got the tests to run by not running gradle with the --parallel flag. Also had to update the EmbeddedPostgres usage to assign a free port to not conflict with my local postgres installation.

meiao commented 1 year ago

I've encountered some problems with segments not ending properly. Investigating.

UPDATE: The issue already exists in the instrumentation for previous versions of the instrumentation and seems only to affect Connection creationg.

koenpunt commented 1 year ago

I've encountered some problems with segments not ending properly.

We've been experiencing the same, also the reason newrelic is currently unusable for, and thus has been disabled for the past month already.

meiao commented 1 year ago

The segments that were not ended were related with the creation of Connections. We will open a different ticket to investigate that.

@koenpunt did you encounter something different?

koenpunt commented 1 year ago

We didn't investigate too much in what the problem was, also because we didn't really know where to look. What didn't help was the noise the token linker produces in the traces/profiling.

koenpunt commented 1 year ago

Also; we've been using it with v1.0.0 of the r2dbc library, not sure if there it's because of the same reasons?

meiao commented 1 year ago

The issue that I found is the same across all versions.