-
Notifications
You must be signed in to change notification settings - Fork 197
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
Define a SQL driver unwrapping method #848
Comments
@Julio-Guerra thanks, your proposed solution looks reasonable to me. I'll create a PR shortly. |
axw
added a commit
to axw/apm-agent-go
that referenced
this issue
Nov 10, 2020
axw
added a commit
to axw/apm-agent-go
that referenced
this issue
Nov 10, 2020
Julio-Guerra
pushed a commit
to sqreen/go-agent
that referenced
this issue
Nov 10, 2020
…re reading its package path Following up on elastic/apm-agent-go#848 and the addition of the `Unwrap()` method to Elastic's SQL driver tracer, it is now possible to unwrap it and properly read the package path of the underlying driver as expected.
Glad to read it - ready on my side too ^^ |
axw
added a commit
that referenced
this issue
Nov 10, 2020
Julio-Guerra
pushed a commit
to sqreen/go-agent
that referenced
this issue
Nov 12, 2020
…re reading its package path Following up on elastic/apm-agent-go#848 and the addition of the `Unwrap()` method to Elastic's SQL driver tracer, it is now possible to unwrap it and properly read the package path of the underlying driver as expected.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey Elastic :-)
Is your feature request related to a problem? Please describe.
I am the lead developer of Sqreen's Go agent, and some users are unfortunately experiencing integration issues when using your APMSQL's driver wrapper
tracingDriver
with our SQL-injection protection.The problem simply comes from the fact the underlying wrapped driver gets hidden and our SQL dialect detection function no longer gets the underlying driver package path but
go.elastic.co/apm/module/apmsql
instead.Describe the solution you'd like
Simply define a new
tracingDriver
methodUnwrap
returning the wrapped driver so that we can detect it and unwrap it:Additional context
As this is a very common issue, I wrote a Go proposal to try to standardize the
Unwrapper
interface at golang/go#42460The text was updated successfully, but these errors were encountered: