-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
objstore.s3: add trace functionality #937
Conversation
`minio.Client` has a `TraceOn` method which will be called when one set the `traceon: true` in the bucket config. This was a feature request here thanos-io#530
4022115
to
86c0757
Compare
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.
This is awesome, thank you very much for the contribution! My only concern: we should probably make the configuration look like this:
trace:
enable: true
so that in the future we could extend it by another field like only_errors
or some other one that we might think of. This is because it might be even more useful to print only non-2xx responses. Perhaps someone will improve minio-go
on that side, and then it will be neat to have everything grouped under one key (: What do you think?
My 2cent - I think I caveat this with I have never used minio so will defer to those who have more experience. |
I am happy to change it to whichever you prefer. |
It's not about anticipating, it's just that printing each and every response will produce lots of spam, and the user would be the most interested in requests which are not successful. Presumably users would only enable this flag if they need to debug a problem with the S3 connectivity. Plus, if it doesn't take a lot of effort to make it very easily extendable, why not? I wanted to see something like this:
Then in the future if
What's your opinion on this matter? |
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.
Awesome work, thank you a lot!
Filled an issue upstream to follow up on this extra functionality: minio/minio-go#1090. 😄 |
@GiedriusS funny, I started working on that before you filed the issue. :) Probably I should have filed it too. |
Changes
minio.Client
has aTraceOn
method which will becalled when one set the
traceon: true
in the bucket config.This was a feature request here
#530
Verification
minio
server locally and created a bucket calledtest1
store.yml
file (notraceon
)./thanos bucket ls --log.level=debug --objstore.config-file=store.yml
Output:
traceon: true
to the configfile and run the same command.Output:
traceon: false
. Got the same result as in 3.