Skip to content

Replace wai-middleware-metrics with prometheus-wai-middleware #23

@adinapoli

Description

@adinapoli

It seems like during the upgrade to 8.10, something broke the wai-middleware-metrics library, so that we cannot report as metrics the number of HTTP requests for 5xx/4xx etc.

I have taken a quick look at this and it seems like the counters and gauges are regularly registered inside the EKG Store, but that somehow the prometheus library decides not to render them.

This might due to the changes to the prometheus format (i.e. from V1 to V2) or some other bugs. Having said that, I see two ways out:

  • We crib/fork the wai-middleware-metrics and we remove the xxx from the registered metrics. I have a hunch that might
    be the bit that Prometheus doesn't like;

  • We swap the library in favour of prometheus-wai-middleware, that should integrate more tightly with the prometheus
    library. The only problem is that the former requires prometheus >= 2.2, but we are stuck with 2.1.2, so we will need a
    bit of massaging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions