B
B
Boris192021-06-11 15:47:13
Python
Boris19, 2021-06-11 15:47:13

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

2 answer(s)
V
Vladimir Korotenko, 2021-06-11
@firedragon

Write statistics to the database and display it, what is the question

Z
zohan1993, 2021-07-29
@zohan1993

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 question

Ask a Question

731 491 924 answers to any question