Pylons / pyramid_debugtoolbar

Pyramid debug toolbar
https://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest/
Other
95 stars 82 forks source link

More 3rd party panels #110

Closed sontek closed 6 years ago

sontek commented 11 years ago

Right now we have a good base set of panels but I think it would be nice to also have panels that give better introspection on other services such as:

MongoDB Redis Memcached ElasticSearch HTML Validator

blaflamme commented 11 years ago

Sure that's a good idea. OTOH I would have expected people working on add-ons should have added panel support in their project. It could become harder to keep up-to-date with everything while maintaining the toolbar.

jvanasco commented 9 years ago

i reorganized some internal code and released it as a standalone dogpile cache panel (https://github.com/jvanasco/pyramid_debugtoolbar_dogpile)

stevepiercy commented 9 years ago

As third party panels are created, they should be added to the list in the docs under Panel and UI Extras. (I went ahead and did pyramid_debugtoolbar_dogpile right now.)

JonnoFTW commented 6 years ago

I made a mongodb panel here: https://gist.github.com/JonnoFTW/de331ac10f82a77150f260e2919a11b0

Should I go to the effort of packaging and publishing this?

stevepiercy commented 6 years ago

@JonnoFTW packaging it yourself or submitting a PR to this package? Pylons Project standards include 100% test coverage and documentation. See https://github.com/Pylons/pyramid_debugtoolbar/blob/master/contributing.md. I'm fairly sure a PR that meets the PP standards would be accepted.

jvanasco commented 6 years ago

@JonnoFTW two comments:

  1. I think the package looks like a better version of pyramid_mongo which ships with it's own debugtoolbar, rather than a standalone debugtoolbar panel/app. That's in part because you're setting it up the connection in a special way early on via add_request_method.

  2. It would be nice if this printed out the mongo connection data and differentiated between what went to which server / connection. I've worked on many apps where there are 2-4 mongo connections/databases.

JonnoFTW commented 6 years ago

@jvanasco to confirm, do you want me to make a separate repository/pip package or do you want me to make a pull request to this repo?

I understand that my database connection approach is a bit different from the way other packages do it, namely I keep one MongoClient instance per app and add connection via add_request_method. This is considered best practice according to the pymongo docs: http://api.mongodb.com/python/current/faq.html#how-does-connection-pooling-work-in-pymongo where they recommend making one client per process. Reopening and closing a client every request has a significant performance hit.

I'm not sure if forcing people to use mongodb this way in their app is appropriate in order for them to use my toolbar. I looked and https://github.com/llacroix/pyramid_mongo does not include a debugtoolbar.

I've improved the toolbar a bit now to include cursor explanations, connection info, handling multiple connections and database/collection stats subtabs.

jvanasco commented 6 years ago

On Jul 24, 2018, at 10:53 PM, Jonathan Mackenzie notifications@github.com wrote:

@jvanasco to confirm, do you want me to make a separate repository/pip package or do you want me to make a pull request to this repo?

IMHO,I think because of this line…

I'm not sure if forcing people to use mongodb this way in their app is appropriate in order for them to use my toolbar. I looked and https://github.com/llacroix/pyramid_mongo does not include a debug toolbar.

...your toolbar would be a good standalone repo/pip package that competes with, and essentially replaces, pyramid_mongo. i don’t know what to call it though.

you’re basically offering Pyramid Mongo with a built in toolbar. i think that is amazing.

JonnoFTW commented 6 years ago

@jvanasco I've made two separate packages now merged:

https://github.com/JonnoFTW/pyramid_mongodb2

I hope this offers a superior experience over pyramid_mongo and similar products

stevepiercy commented 6 years ago

@JonnoFTW PyPI has problems rendering the readmes. See https://dustingram.com/articles/2018/03/16/markdown-descriptions-on-pypi for how to fix.

Also I'd like to help you promote the packages:

Please let me know.

JonnoFTW commented 6 years ago

@stevepiercy I've done those things. If you'd like to post from the twitter, I'm fine with that.

I'll probably post to reddit too.

stevepiercy commented 6 years ago

@JonnoFTW all done on my end.

Closing this issue to break it up into a separate issue for each of the ideas originally suggested. See #336, #337, #338, #339.