Skip to content
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

store/s3: add possibility to get more information about the requests/responses #530

Closed
GiedriusS opened this issue Sep 20, 2018 · 7 comments

Comments

@GiedriusS
Copy link
Member

It would be useful to be able to look at the requests themselves made by Thanos Store easily. minio-go supports a method called TraceOn: https://github.com/minio/minio-go/blob/master/api.go#L347. If that is called on a client then each request and response is logged to a io.Writer. Perhaps this could be added behind a separate flag something like --s3.traceon. It could optionally take a string argument - a file where such logs would be written. Obviously, one can look at the requests made by Thanos Store by using external tools such as tcpdump or strace but IMHO it would be useful to have such functionality baked in Thanos Store to make it easier to debug problems.

@bwplotka
Copy link
Member

With the new objstore.config, you are more than welcome to add this option (: 👍 or anyone else can do it.

@GiedriusS
Copy link
Member Author

GiedriusS commented Oct 10, 2018

Actually, c.TraceOn() makes it print each request and response. It would have a lot of unnecessary information. Instead, maybe we should improve minio-go to only print those things when the request had gotten a response which is not 2xx. Only then we should add this flag. Without that, there would be way too much noise and this feature in general would not be useful.

@bwplotka
Copy link
Member

Well, it might be ok to put it under feature flag, so you can start your component with this super verbose option only temporary while debugging. (:

@szalai1
Copy link
Contributor

szalai1 commented Mar 6, 2019

@GiedriusS hi did you start working on this? if not I am happy to do it. let me know

@szalai1
Copy link
Contributor

szalai1 commented Mar 7, 2019

or/and @bwplotka Do you know anybody who started working on this ?

@bwplotka
Copy link
Member

bwplotka commented Mar 7, 2019

Not aware of any, so go for it!

szalai1 added a commit to szalai1/thanos that referenced this issue Mar 17, 2019
`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
GiedriusS pushed a commit that referenced this issue Mar 22, 2019
* add trace functionality to S3 client

`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
#530

* typo

* make docs

* change s3 trace configuration
@GiedriusS
Copy link
Member Author

Thank you a lot for your work on this, @szalai1! Closing as this exists now in form of trace.enable: true.

brancz pushed a commit to brancz/objstore that referenced this issue Jan 28, 2022
* add trace functionality to S3 client

`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/thanos#530

* typo

* make docs

* change s3 trace configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants