-
Notifications
You must be signed in to change notification settings - Fork 161
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
Provide a message explaining that metrics are disabled when running i… #151
Conversation
…n the Flask development server with reloading enabled
You can check issue #4 for more context. What do you think? |
Makes sense to me. To be honest I have read that issue and the |
@@ -263,12 +263,18 @@ def register_endpoint(self, path, app=None): | |||
(by default it is the application registered with this class) | |||
""" | |||
|
|||
if is_running_from_reloader() and not os.environ.get('DEBUG_METRICS'): | |||
return |
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.
Sorry, I should have been clearer: I think we should log the warning here once, at startup, and just return then as before, so we don't even attempt registering the metrics endpoint that will be unavailable under the reloader anyway.
Yeah, it's been a little while ago, so I don't remember the exact details, but if I remember correctly, the metrics endpoint is somehow unavailable when you run Flask with the reloader. |
Thanks for this change! I'll merge this and release it later today if I get the chance. |
Thanks :) |
…n the Flask development server with reloading enabled
I have to admit I'm not really sure why metrics are disabled--if you can suggest some better wording I'll update the message.