newrelic / go-agent

New Relic Go Agent
Apache License 2.0
762 stars 294 forks source link

Add support to CopyFrom method in pgx integration #825

Open vinicius-batista opened 9 months ago

vinicius-batista commented 9 months ago

Summary

Hi, currently we are using pgx methods CopyFrom, that uses postgresql copy protocol, on ours bulk inserts. Pgx provides an interface from this method on Tracer interface but it's not implemented on pgx v5 integration. I have found a open telemetry integration that implements support to CopyFrom link

Desired Behaviour

When any CopyFrom methods is called should appear a span on new relic request trace.

Possible Solution

I think we can base on otel implementation. If it's needed, I can provide a PR for this feature

Additional context

iamemilio commented 9 months ago

IF you would like to put forward a pr, we are happy to guide you by leaving comments. Please assign one of us to it, and make sure to take the PR against the develop branch.