Skip to content

Wrap all metrics functionality in newtypes provided in astria-telemetry #1147

@Fraser999

Description

@Fraser999

All metrics functionality should be provided via the astria-telemetry crate so that our other crates don't need to depend upon the metrics or metrics-exporter-prometheus crates.

astria-telemetry should provide a metrics Builder to allow for configuring and registering metrics. Builder::build should consume self to avoid later attempts to register further metrics, and should return an instance of the calling crate's Metrics struct along with a wrapped handle to the PrometheusHandle which will be useful for tests.

As well as registering individual metrics, the builder should support optionally starting the exporter server, and optionally registering the global metrics recorder.

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