Skip to content
  • Kevin Morris's avatar
    feat(fastapi): add prometheus /metrics · f21765bf
    Kevin Morris authored
    
    
    This commit provides custom metrics, so we can group requests
    into their route paths and not by the arguments given, e.g.
    /pkgbase/some-package -> /pkgbase/{name}. We also count RPC
    requests as `http_api_requests_total`, split by the RPC
    query "type" argument.
    
    - `http_api_requests_total`
        - Labels: ["type", "status"]
    - `http_requests_total`
        - Number of HTTP requests in total.
        - Labels: ["method", "path", "status"]
    
    Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
    f21765bf