Skip to content

Ensure all metrics are registered on executable startup #1100

@Fraser999

Description

@Fraser999

Currently across all our binaries, individual metrics are only registered on their first usage, i.e. when we record that metric for the first time. This is not ideal, as some metrics (especially ones recording failures) remain invisible via the metrics endpoint throughout the lifetime of the session.

We should register all metrics during startup, potentially holding the returned metric object in a new struct which can be cloned to all places in the codebase required to record metrics. This would be more efficient than attempting to register the given metric every time we want to record it.

We should also ensure the call to register_metrics occurs after the call to metrics_builder.install() as it has no effect otherwise.

Metadata

Metadata

Assignees

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