client_python
client_python copied to clipboard
Prometheus instrumentation library for Python applications
## Description This PR adds documentation for monitoring FastAPI applications running with Uvicorn ASGI server.
This pr is about supporting a custom multiprocess metric path, not changing current usage about env PROMETHEUS_MULTIPROC_DIR. I found that MultiProcessCollector supports a path param https://github.com/prometheus/client_python/blob/master/prometheus_client/multiprocess.py#L22, though metrics don't support...
Hey. I stumbled over the question what to use when one specifies the Prometheus Client as a `dependency=` in `pyproject.toml`? - you guys seem to use `prometheus_client` (underscore) https://github.com/prometheus/client_python/blob/46eae7bae88f76951f7246d9f359f2dd5eeff110/pyproject.toml#L6C9-L6C26 -...
**Summary:** When I start a prometheus server, then stop it, then re-start it, server can not restart because port was not released. I am following steps indicated by [documentation](https://github.com/prometheus/client_python/blob/c89624f784c344803699d3bdcfb5c24b5e63307b/docs/content/exporting/http/_index.md?plain=1#L22-L28) **Usecase:**...
I tried using the [example code](https://prometheus.github.io/client_python/parser/)... ```python import sys from prometheus_client.openmetrics.parser import text_string_to_metric_families for family in text_string_to_metric_families(sys.stdin.read()): for sample in family.samples: print("Name: {0} Labels: {1} Value: {2} Timestamp: {3}".format(*sample)) ```...
This is an idea to try to improve multiprocess collect performance by using rust to collect the metrics from various .db files. Current state of the benchmarks shows a 2x...
Fix #1020
Use sub-class of ValueError instead of ValueError, so that we can distinguish issues caused by wrong input (like invalid name format) from duplicate metrics being registered into the same registry.
Detect deadlocks during the library misuse, eg. by injecting code into the critical sections that itself might want to obtain the relevant lock. A follow up to #1076.
Now we are working on **Prometheus** support in **FastStream** and faced with a problem. Shared registry between different middlewares leads to MetricsContainer duplication. So, we would like to have a...