-
Notifications
You must be signed in to change notification settings - Fork 40
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
Tracking issue for USDT Integration #298
Comments
Just a thought. We'd talked previously about getting the actual SQL strings at various points -- this might be a good candidate. We might not want to log them all the time, but a probe spitting it out could be very helpful. |
I think we could get pretty far with:
|
@davepacheco USDT requires nightly, and there's no easy way to instruct it to generate empty probes if nightly isn't opted into. Are you cool with transferring that requirement to Dropshot? |
(We could also do the same thing for the per-connection implementation: https://github.com/oxidecomputer/async-bb8-diesel/blob/dc5ff98304efe98dfb9736a4634e5841108690bb/src/connection.rs#L39-L46 ) This would effectively look like: async fn batch_execute_async(&self, query: &str) -> ConnectionResult<()> {
let diesel_conn = Connection(self.0.clone());
let query = query.to_string();
task::spawn_blocking(move || {
/* ++ FIRE PROBE HERE, RECORD QUERY ++ */
diesel_conn.inner().batch_execute(&query)
})
.await
.unwrap() // Propagate panics
.map_err(ConnectionError::from)
} |
@bnaecker What about adding a Dropshot (or usdt) feature such that:
It's not as slick as automatically detecting this but it might even be better. It avoids a problem I've run into in the past where I thought something should have DTrace probes, but a bug in the build process failed to detect support, and we didn't discover that until we needed the probes in production. |
@smklein That sounds good. |
@davepacheco That should be fairly easy to add into USDT. We already have a no-op implementation for platforms without DTrace, so adding a feature that allows specifically selecting it would be straightforward. Dropshot could then re-export that feature. |
Just an update on some of the upstream work. Probes for log messages can be inserted via the |
The database-related probes, for connections and queries, has been implemented as part of #488. |
Log messages are emitted to DTrace as part of #489. |
I have been looking through issues to find things related to development and debugging. Can this one be closed? |
I think we've gotten a good core of probes, and hopefully folks find it easy enough to add more. I'll close this now, thanks @jordanhendricks. |
https://crates.io/crates/usdt is super sick, and it's about time we start integrating! This issue tracks integration into a variety of potential spots within omicron:
The text was updated successfully, but these errors were encountered: