Skip to content

Remove near-o11y nearcore metric dep wrapper #1908

@DSharifi

Description

@DSharifi

Background

We depend on nearcore's prometheus wrapper. It's only used in a few metrics and should be removed such that we use the prometheus crate directly as in our all other metrics.

pub static MPC_TRIPLES_GENERATION_TIME_ELAPSED: LazyLock<prometheus::Histogram> =
LazyLock::new(|| {
near_o11y::metrics::try_create_histogram(
"near_mpc_triples_generation_time_elapsed",
"Time taken to generate a batch of triples",
)
.unwrap()
});
pub static MPC_PRE_SIGNATURE_TIME_ELAPSED: LazyLock<prometheus::Histogram> = LazyLock::new(|| {
near_o11y::metrics::try_create_histogram(
"near_mpc_pre_signature_time_elapsed",
"Time taken to generate a pre signature",
)
.unwrap()
});
pub static MPC_SIGNATURE_TIME_ELAPSED: LazyLock<prometheus::Histogram> = LazyLock::new(|| {
near_o11y::metrics::try_create_histogram(
"near_mpc_signature_time_elapsed",
"Time taken to generate a signature",
)
.unwrap()
});
pub static MPC_CKD_TIME_ELAPSED: LazyLock<prometheus::Histogram> = LazyLock::new(|| {
near_o11y::metrics::try_create_histogram(
"near_mpc_ckd_time_elapsed",
"Time taken to generate a confidential key",
)
.unwrap()
});

User Story

No response

Acceptance Criteria

remove near-o11y from the workspace and use prometheus directly for the metrics that rely on it.

Resources & Additional Notes

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions