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

database/sql: Export TracedConn, as we need it when using the db.Conn Raw() API call. #1779

Merged
merged 5 commits into from
Mar 6, 2023
Merged

Conversation

samsm
Copy link
Contributor

@samsm samsm commented Mar 6, 2023

We would prefer to be able to type assert to this interface type, but we cannot type assert without the type being exported. The alternative would be to use reflection here.

In addition, we want to be able to, on occasion, access the underlying connection object, hence the addition of the WrappedConn() function.

This is an up-to-date-version of #1566 , you can read this change there.

We would prefer to be able to type assert to this interface type, but we cannot type
assert without the type being exported. The alternative would be to use reflection here.

In addition, we want to be able to, on occasion, access the underlying connection object, hence
the addition of the WrappedConn() function.

Signed-off-by: Alec Warner <alec.warner@panther.io>
@samsm samsm marked this pull request as ready for review March 6, 2023 14:01
@samsm samsm requested a review from a team March 6, 2023 14:01
@ahmed-mez ahmed-mez added this to the v1.49.0 milestone Mar 6, 2023
@ahmed-mez
Copy link
Contributor

Hi @samsm ! Thanks for the contribution! The CI is failing because exported methods and structs don't have comments https://github.com/DataDog/dd-trace-go/actions/runs/4344226735/jobs/7587359442 - please update the PR accordingly!

contrib/database/sql/conn.go Show resolved Hide resolved
contrib/database/sql/conn.go Outdated Show resolved Hide resolved
Co-authored-by: Ahmed Mezghani <38987709+ahmed-mez@users.noreply.github.com>
Co-authored-by: Ahmed Mezghani <38987709+ahmed-mez@users.noreply.github.com>
@ahmed-mez ahmed-mez changed the title Export TracedConn, as we need it when using the db.Conn Raw() API call. database/sql: Export TracedConn, as we need it when using the db.Conn Raw() API call. Mar 6, 2023
@ahmed-mez ahmed-mez merged commit f7a7c53 into DataDog:main Mar 6, 2023
@antarus12345
Copy link
Contributor

Thanks for finishing this up!

it ended up being lower priority on our side but glad to see it merged ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants