Skip to content

promhttp: Investigate interaction of the metrics handler with certain middlewares #622

@beorn7

Description

@beorn7

prometheus/prometheus#5085 demonstrated problems if the compression middleware from the echo framework was used, see https://github.com/labstack/echo/blob/master/middleware/compress.go .

The promhttp.Handler his its own gzip handling. Perhaps it's inevitable to then not work with other middlewares handling compression (which then should be clearly documented). But perhaps there is also something middleware-unfriendly that could be fixed in promhttp.Handler.

Purpose of this issue is to investigate how promhttp.Handler interacts with certain middlewares (echo framework, but also others, e.g. the NYTimes gzip handler, and also find out if problems happen with other, non-compressing middlewares). In v1, we might be able to fix problems, if there are any in the handler. For v2, we might consider separating out compression if there are established middlewares handling compression nicely. (On the other hand, the result could as well be that it is impossible to handle compression as a middleware without problems in certain situations, and thus handling it in the current way might be just right.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions