SILENT KILLERPanel

Current Path: > > opt > cloudlinux > venv > lib64 > python3.11 > site-packages > prometheus_client >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/venv/lib64/python3.11/site-packages/prometheus_client/

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
bridge Directory - -
openmetrics Directory - -
twisted Directory - -
__init__.py File 1817 bytes April 17 2025 13:10:58.
asgi.py File 1185 bytes April 17 2025 13:10:58.
context_managers.py File 1691 bytes April 17 2025 13:10:58.
core.py File 895 bytes April 17 2025 13:10:58.
decorator.py File 15802 bytes April 17 2025 13:10:58.
exposition.py File 15283 bytes April 17 2025 13:10:58.
gc_collector.py File 1458 bytes April 17 2025 13:10:58.
metrics.py File 22184 bytes April 17 2025 13:10:58.
metrics_core.py File 11881 bytes April 17 2025 13:10:58.
mmap_dict.py File 5264 bytes April 17 2025 13:10:58.
multiprocess.py File 6474 bytes April 17 2025 13:10:58.
parser.py File 7256 bytes April 17 2025 13:10:58.
platform_collector.py File 1735 bytes April 17 2025 13:10:58.
process_collector.py File 3654 bytes April 17 2025 13:10:58.
registry.py File 5357 bytes April 17 2025 13:10:58.
samples.py File 1358 bytes April 17 2025 13:10:58.
utils.py File 621 bytes April 17 2025 13:10:58.
values.py File 3836 bytes April 17 2025 13:10:58.

Reading File: //opt/cloudlinux/venv/lib64/python3.11/site-packages/prometheus_client//asgi.py

from urllib.parse import parse_qs

from .exposition import _bake_output
from .registry import REGISTRY


def make_asgi_app(registry=REGISTRY):
    """Create a ASGI app which serves the metrics from a registry."""

    async def prometheus_app(scope, receive, send):
        assert scope.get("type") == "http"
        # Prepare parameters
        params = parse_qs(scope.get('query_string', b''))
        accept_header = "Accept: " + ",".join([
            value.decode("utf8") for (name, value) in scope.get('headers')
            if name.decode("utf8") == 'accept'
        ])
        # Bake output
        status, header, output = _bake_output(registry, accept_header, params)
        # Return output
        payload = await receive()
        if payload.get("type") == "http.request":
            await send(
                {
                    "type": "http.response.start",
                    "status": int(status.split(' ')[0]),
                    "headers": [
                        tuple(x.encode('utf8') for x in header)
                    ]
                }
            )
            await send({"type": "http.response.body", "body": output})

    return prometheus_app

SILENT KILLER Tool