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

Expose debug info #42

Open
kurin opened this issue Mar 6, 2018 · 3 comments
Open

Expose debug info #42

kurin opened this issue Mar 6, 2018 · 3 comments

Comments

@kurin
Copy link
Owner

kurin commented Mar 6, 2018

In #41 a user noticed that there was no data going, but didn't have good visibility into what was happening.

Should b2 expose debug info? If so, how?

@kurin
Copy link
Owner Author

kurin commented Mar 6, 2018

We already have Client.Status(), but getting information out of this requires application authors to take advantage of it. It might be nice to provide either a debug page listening (off the default mux) on a local socket or at least a library that makes it easy to do so.

@kurin
Copy link
Owner Author

kurin commented Mar 6, 2018

This needs to find a balance between "once you need it, you'll wish you had enabled it" and "don't do weird, unexpected nonsense like put http servers on random sockets."

@kurin
Copy link
Owner Author

kurin commented Mar 6, 2018

Maybe for now just add ServeHTTP to b2.Client and let app authors call http.Handle("/b2what", client) if they like.

kurin added a commit that referenced this issue Mar 8, 2018
A Counter can efficiently keep track of requests made in an arbitrary
span of time, to an arbitrary degree of precision.  This will allow
us to expose usage stats over time for e.g. #42.
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

1 participant