-
Notifications
You must be signed in to change notification settings - Fork 89
Add TracingStore wrapper implementation #432
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
base: main
Are you sure you want to change the base?
Conversation
Cargo.toml
Outdated
http = "1.2.0" | ||
humantime = "2.1" | ||
itertools = "0.14.0" | ||
log = "0.4.27" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use tracing instead given this crate already depends on it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! The PR has been updated to reflect this.
src/trace.rs
Outdated
debug!( | ||
"{} head request for {}/{}", | ||
self.prefix, self.path_prefix, location | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of debug level events, maybe we should use spans?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made some changes to use spans instead.
FWIW, https://github.com/datafusion-contrib/datafusion-tracing/tree/main/instrumented-object-store exists and seems to work well with our use of datafusion. Just wanted to point it out to reduce duplication of efforts. cc @geoffreyclaude |
👋 Hi! |
I'm happy with anything, but I feel like tracing is a better fit for instrumenting these kinds of requests and it's nice to have a canonical version. I would probably pull |
Absolutely, that makes a lot of sense as well! Feel free to copy |
How does that version look? I've made some modifications to avoid the use of single events and moved to using spans. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good to me -- thank you @m09526
@geoffreyclaude and @asubiotto are you happy with this implementation as well?
AFAIU this PR reimplements functionality that already exists in |
@alamb I agree with @asubiotto that moving Moreover, from a quick look at this PR it seems to be missing functionality of |
We deliberately only instrumented the non-provided trait functions since the plain versions of We could add other things like tracing of operation results? |
Not necessarily: you can very well have a particular implementation that overrides the Trait's |
Which issue does this PR close?
Closes #380.
Rationale for this change
This adds an ObjectStore wrapping implementation that logs all calls being made to the wrapped implementation. This is to aid in debugging. It is particularly useful when object stores are used by 3rd party code such as Apache DataFusion so the developer can determine what remote object calls the 3rd party code is making.
What changes are included in this PR?
TracingStore wrapper is added.
Are there any user-facing changes?
Yes, the new implementation is part of the public API.