Skip to content

Qustion: What are the best practices for testing exposed metrics compatibility? #2004

@iypetrov

Description

@iypetrov

What’s the recommended way to write compatibility tests for all metrics an app exposes? I want to detect breaking changes like renamed metrics, removed metrics, changed labels/types, etc. This should includes metrics from:

  • Built-in collectors (go_*, process_*)
  • Custom app metrics
  • 3rd-party metrics (gRPC, OpenTelemetry, etc.)

P.S. I was thinking about using the Describe method from the Collector interface to discover all metrics a collector can expose. But I couldn’t find a way to ask a Registry for the list of registered collectors. Would it make sense to add something like this to support this kind of use case, or is there a recommended way to achieve it already?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions