Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The pgx integration silently overwrites other tracers #2908

Closed
mbyio opened this issue Oct 3, 2024 · 1 comment · Fixed by #2932
Closed

[BUG] The pgx integration silently overwrites other tracers #2908

mbyio opened this issue Oct 3, 2024 · 1 comment · Fixed by #2932
Assignees
Labels
ack bug unintended behavior that has to be fixed

Comments

@mbyio
Copy link

mbyio commented Oct 3, 2024

Version of dd-trace-go

Latest version v1.68.0

Describe what happened:

If you take a look at this code, you can see the problem:
https://github.com/DataDog/dd-trace-go/blob/main/contrib/jackc/pgx.v5/pgxpool.go#L24

The datadog tracing integration overwrites any existing Tracer in the pgx config.

Describe what you expected:

Datadog should wrap any existing tracers it finds, instead of just overwriting them.

For our specific use case, we want to add debug logging for all database queries. In pgx, the way to do that is to add a tracer to the config. Unfortunately, Datadog silently overwrites our custom tracer, so we can't add logging.

@mbyio mbyio added the bug unintended behavior that has to be fixed label Oct 3, 2024
@github-actions github-actions bot added the needs-triage New issues that have not yet been triaged label Oct 3, 2024
@rarguelloF
Copy link
Contributor

Hello @mbyio and thanks for reporting this issue! I've confirmed this is indeed a problem, so we will handle as soon as possible.

@rarguelloF rarguelloF self-assigned this Oct 15, 2024
@rarguelloF rarguelloF added ack and removed needs-triage New issues that have not yet been triaged labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack bug unintended behavior that has to be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants