Skip to content
This repository was archived by the owner on Apr 18, 2023. It is now read-only.
This repository was archived by the owner on Apr 18, 2023. It is now read-only.

pre-defining gRPC call metrics #79

Open
@vespian

Description

@vespian

Currently, the vector metrics are created on the fly - i.e. once the call is made, the corresponding metric label is registered. So for example, if I have a unary gRPC service "Foo", only after I make a call to "Foo", the metrics with labels grpc_method=Foo grpc_service=FooService will appear in Prometheus' /metrics endpoint.

Would it be possible to add a method/function to pre-warm metrics in the case when one needs a complete set of possible metrics up-front? My use case is integration testing - while checking whether all the metrics are present/registered during integration test, I need to account for all gRPC calls that have been made during that test, which makes it flaky.

Prometheus Go client itself allows calling <metrics_object>.WithLabelValues(...) in order to achieve this.

Thanks in advance for a reply.

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