Skip to content

Refactor Prometheus usage to explicitly pass a registry #2829

@tstirrat15

Description

@tstirrat15

We're currently implicitly using the default registry, which means that tests sometimes flake because two different tests attempt to add the same metric to the same registry, and there's functionality where you can explicitly set up and pass a registry: https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#hdr-Advanced_Uses_of_the_Registry

If we moved to that approach, we could have each test provide its own registry and avoid duplicate registration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/tech debtAddresses legacy code/decisions

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions