Comments (2)
Make total sense, thanks for your help and best of luck with the fires in your country !
from prometheus_flask_exporter.
Hi! No need to apologize, this is a completely valid question!
This library provides decorators for your Flask managed endpoints, e.g. the @metrics.counter
will count the number of times your /newaliment
has been called. If you want to keep track of a different counter and manage it yourself, you could get a Counter
from the underlying library like this (double-check if I haven't messed up the syntax) :
from prometheus_flask_exporter import Counter
my_counter = Counter('name', 'description')
...
db.session.commit()
my_counter.inc()
Does this help?
from prometheus_flask_exporter.
Related Issues (20)
- Support for push using Prometheus remote_write? HOT 2
- Streaming responses and latency HOT 1
- Is it possible to give a metric an inital value? HOT 3
- Multiprocess application sometimes throwing UnicodeDecodeError HOT 1
- Possible to easily concatenate additional metrics? HOT 3
- How to add dynamic value in label for counter? HOT 2
- prometheus_flask_exporter/examples/uwsgi-lazy-apps/server.py HOT 6
- Registering new collectors with GunicornInternalPrometheusMetrics HOT 1
- Gunicorn mutliprocess with app factory pattern examples HOT 1
- two questions about filtering information (only need path info, omit static file like *.css) HOT 3
- With `group_by='url_rule'` all unhandled URLs become `None` in metrics HOT 5
- Lambda functions on metrics page HOT 5
- Question: is it possible to group metrics of endpoints that use path parameters? HOT 2
- Receiving 404 when trying to curl /metrics HOT 6
- How to clean PROMETHEUS_ MULTIPROC_ HOT 2
- Could not import prometheus_flask_exporter.multiprocess HOT 4
- Enum metric type not supported HOT 2
- Support connexion 3.0 HOT 2
- Gunicorn metrics don't work HOT 6
- Not receiving process_* in multiprocess HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prometheus_flask_exporter.