-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
DisableErrSkip() not working as expected #207
Comments
Hey @pmlanger, Thanks for opening the issue.
I think you are right 👍 please open a PR as I can't fix this by Monday. Otherwise, I will work on a fix next week.
I'm not aware of all the use cases in each driver implementation. If you post some examples of where it happens, I may be able to look into it. |
@pmlanger :D can you rebase with master then? |
@nhatthm Will do! |
Just to follow up on this: I have tracked it down to this line in go-sql-driver/mysql. Setting the InterpolateParams config to |
Nice! |
Hello,
to avoid the
driver: skip fast-path; continue as if unimplemented
error being attached to spans, I added theDisableErrSkip()
option to theotelsql.Wrap()
call like this:otelsql.Wrap(d, otelsql.WithSystem("mysql"), otelsql.DisableErrSkip())
However, this hasn't produced the result I expected, as the error was still added to the spans.
I think that this is because
vendor/go.nhat.io/otelsql/driver.go
innewConnConfig
does not add theerrorToSpanStatus
function tot.errorToStatus
(t
beingmethodTracerImpl
).I have patched the lib to add it, and it looks like it's working now (spans are not marked as error any longer, using the option).
If you agree, I could provide a PR with that change.
Also, do you have any additional insights as to how I could circumvent the error to happen in the first place (using github.com/go-sql-driver/mysql v1.7.1 with MySQL v8)?
Thanks a lot!
The text was updated successfully, but these errors were encountered: