proxy.py/proxy/core/event
Abhinav Singh 091ba361ef
Prometheus Metrics (#1447)
* Add metrics server endpoint

* Setup metrics subscriber

* `MetricsSubscriber` as context manager

* Fix lint issues

* `--enable-metrics` flag which setup Metrics subscriber, collector and web endpoint

* Use file storage based mechanism to share internal metrics with prometheus exporter endpoint

* Lint fixes

* Move `_setup_metrics_directory` within subscriber which only run once

* Use global `metrics_lock` via flags

* Remove top-level imports for prometheus_client

* Add `requirements-metrics.txt`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix typo in makefile

* Fix typo

* fix type, lint, flake issues

* Remove event queue prop

* Fix typo

* Give any role to `proxy.http.server.metrics.get_collector`

* rtype

* `emit_request_complete` for web servers

* Fix doc issues

* Refactor

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename metrics to start with proxypy_work_

* Startup `MetricsEventSubscriber` as part of proxy

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-11 19:30:18 +05:30
..
__init__.py [isort] Lib modules (#1016) 2022-01-20 15:34:54 +05:30
dispatcher.py [Examples] Fix broken examples (#1077) 2022-01-30 18:30:54 +05:30
manager.py [isort] Lib modules (#1016) 2022-01-20 15:34:54 +05:30
metrics.py Prometheus Metrics (#1447) 2024-08-11 19:30:18 +05:30
names.py [isort] Lib modules (#1016) 2022-01-20 15:34:54 +05:30
queue.py [Examples] Fix broken examples (#1077) 2022-01-30 18:30:54 +05:30
subscriber.py [Examples] Fix broken examples (#1077) 2022-01-30 18:30:54 +05:30