Any interest in adding an official tracing mechanism to the database/sql package for Go 1.10?
I will create an RFC to submit to golang/go, looking for any coordination information to help design the document.
Why?
With OpenTracing and Amazon X-Ray looking at adding official Go APIs, and all the other various vendors out there looking to add support in their own ways, to improve cohesion I was thinking that database/sql should get its own "httptrace" sub package in the form of sqltrace.
There is a demo implementation already in place for the methodology to follow with the httptrace library, and we've got context support in database/sql now that could be used for any request specific data that needs to be kept through the life-cycle of the call.
Why now?
I started to think about this because of the open source of the Amazon X-Ray SDK beta for Go. The implementation they have done is not *sql.DB compliant, they change the signatures of Exec, Query, etc to accept contexts. I created one ticket
https://github.com/aws/aws-xray-sdk-go/issues/13 that is related to restoring the interface compatibility in Go 1.8+ where we have context native functions to call. Adding a sqltrace library
Thank you for your consideration. I will be preparing an RFC document to submit to the golang project, with proposed interfaces. Just looking for any additional coordination or assistance in considering possible issues to include as part of the proposal.