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

programmatically exclude endpoints #358

Open
sebastianelsner opened this issue Aug 30, 2020 · 5 comments
Open

programmatically exclude endpoints #358

sebastianelsner opened this issue Aug 30, 2020 · 5 comments

Comments

@sebastianelsner
Copy link

It is great to be able to change the monitoring level in the ui. Having a lot of endpoints (that are e.g. generated by Flask-Admin), I do not want to monitor nor see those or even others I created manually in the dashboard overview. Thus I would like to see a feature where I could ignore endpoints completely and define this in code. E.g.

app.config["flask_monitoringdashboard"] = {
    "ignore": [
	    "^/static/.*",
	    ".*/foobar/.*",
	]
}

Or endpoint declarations after bind() will be hidden to the dashboard.

@mircealungu
Copy link
Member

Hi Sebastian,

This is a nice idea actually 👍
Do you think you could give a first stab at implementing it and sending a PR? :)

Cheers!
M.

@sebastianelsner
Copy link
Author

Hi,

Will try. Can you point me to the module where you see this code living?

@dejagersh
Copy link
Collaborator

Have a look at flask_monitoringdashboard/core/measurement.py, that's where the wrappers are added. The function init_measurement() is where that starts.

@Voltini
Copy link

Voltini commented Aug 25, 2023

Hi, I know it's been a while but this may be helpful to other people.
While you can't configure the monitoring level of each endpoint using this library, you can do so by directly querying the database where the monitoring data is stored using an ORM library such as sqlalchemy.

@mircealungu
Copy link
Member

This should not be hard to do... in fact, it could be a nice first task for somebody who wants to join the project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants