Answer the question
In order to leave comments, you need to log in
What is the best way to keep statistics on the work of the service?
There is a service written in python. Multiple instances of this service run on multiple servers. The service takes tasks from the database. I would like to keep statistics on how many tasks each of the running services has processed. Advise, please, what are the good practices for solving such a problem, how to collect statistics of this kind.
Answer the question
In order to leave comments, you need to log in
Write statistics to the database and display it, what is the question
it all depends on how you plan to collect, store, process metrics
, for example, if you just need to count the number of completed tasks for each instance of the service
and you already have monitoring based on Prometheus
, it will be convenient to use the Prometheus client library for Python
https://github.com/prometheus /client_python
then you can easily collect this data in Prometheus, and, accordingly, further process it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question