-
Notifications
You must be signed in to change notification settings - Fork 566
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
Opentelemetry for database/sql #5
Comments
FYI initial attempt that looks like a different approach would be more desirable #32 |
I have an initial proof of concept I implemented at https://github.com/seslattery/otelsql. If this seems like a useful direction to be explored more, I'd be happy to open a PR and work on polishing it up some more. |
@seslattery please do open a PR. I'd like to see |
Prior work in OpenCensus might be useful to look at: https://github.com/opencensus-integrations/ocsql I would not copy this, but might be interesting to look at. |
Prior attempt within this repo: #32 |
@seslattery are you still planning on submitting a PR?
@MrAlias what are your thoughts on using something like https://github.com/ngrok/sqlmw as an interceptor to wrap drivers? I think an approach similar to https://github.com/seslattery/otelsql is more desirable than #32. If we would like to forego the wrapper approach then we have both OpenTracing and OpenCensus examples to draw from. It would be nice if we could enumerate what we like about each, and what this should look like for OpenTelemetry. |
@seanschade Thanks for the ping! Sorry for the delay, this fell off my radar. I cleaned up the code a little bit and added an example. PR is here: #320. Notably my implementation still doesn't have any tests. |
Looking at that PR, it would be nice to be able to opt into specific spans. The SQL driver can be very chatty, so allowing opt-in like the ocsql package would be nice. |
I agree with @derekperkins on the approach. I think an approach similar to what OpenCensus did is preferred to the approach of using the
This sounds like a great idea 👍 . I think including something like this in this issue would help future developers understand the eventual choice made and what out strategy was. |
Is there any progress about this issue? |
hi, any progress about this issue? |
Is there someone is this issue that could head up this effort? This issue has not seen much focus from the maintainer/approver development team of this project as it is not a part of the things needed for our GA release (there are quite a lot of issues prioritized for that effort that need to take precedence). That said, it seems like there is a fair amount of community interest here. It would be ideal if someone can take the initiative and start work on what @seanschade laid out as a first step to a solutions design:
From the outcome of that analysis the implementation of a solution would need to be iterative. We've discussed a few times in our SIG meetings that the initial solution here does not need to solve all the combinatorial possibilities (like #32) but provided more of an MVP to build from. |
+1 for @j2gg0s's implementation. Metrics are far more important to us than tracing as they power alerting, dashboards and automation. |
Are alternative designs being considered? Using an observability tool like Honeycomb/Lightstep, you want as many details available on the one span as possible as that allows those things to be properly queried, and expose where other tags differ on those kinds of spans. The way I imagine that would be something like:
I'd also be looking to hook into these details to aggregate things like number of statements executed, rows returned, total duration to put into the root span for the service e.g. the HTTP request that needs those queries executed. |
From the SIG meeting today:
Also,
|
Any update on the SIG discussion? |
I'd like to work on this by implementing an MVP (probably not include metrics first) |
I've been watching this issue, but I wasn't aware that @XSAM had indeed built a version https://github.com/XSAM/otelsql. In his PR, @Aneurysm9 said this about landing official support #505 (comment)
|
In accordance with the new instrumentation policy hosting guidelines I'm closing this. |
I'm not 100% sure I understand why this wouldn't be hosted here. I get offloading instrumentation for public packages to their repos, but I don't see how that applies to stdlib packages. This |
+1 to the idea that if |
@MrAlias any feedback on this? |
For anyone subscribed to or who finds this issue, this fork https://github.com/XSAM/otelsql is active and probably your best bet for the time being. |
Has anyone done a comparison between https://github.com/XSAM/otelsql and https://github.com/uptrace/opentelemetry-go-extra/ ? |
It's good to see support for database/sql driver. We've some discussion here open-telemetry/opentelemetry-go#490.
The text was updated successfully, but these errors were encountered: