7 releases
Uses new Rust 2024
0.1.1 | Feb 21, 2025 |
---|---|
0.1.0 | Feb 10, 2025 |
0.0.4 | Dec 8, 2024 |
0.0.0 | Nov 28, 2024 |
#607 in Video
33 downloads per month
Used in scuffle-image-processor
55KB
1K
SLoC
A wrapper around opentelemetry to provide a more ergonomic interface for creating metrics.
This crate can be used together with the
scuffle-bootstrap-telemetry
crate
which provides a service that integrates with the
scuffle-bootstrap
ecosystem.
Example
#[scuffle_metrics::metrics]
mod example {
use scuffle_metrics::{MetricEnum, collector::CounterU64};
#[derive(MetricEnum)]
pub enum Kind {
Http,
Grpc,
}
#[metrics(unit = "requests")]
pub fn request(kind: Kind) -> CounterU64;
}
// Increment the counter
example::request(example::Kind::Http).incr();
For details see metrics!
.
Status
This crate is currently under development and is not yet stable.
Unit tests are not yet fully implemented. Use at your own risk.
License
This project is licensed under the MIT or Apache-2.0 license. You can choose between one of them if you use this work.
SPDX-License-Identifier: MIT OR Apache-2.0
scuffle-metrics
Warning
This crate is under active development and may not be stable.
A wrapper around opentelemetry to provide a more ergonomic interface for creating metrics.
Status
This crate is currently under development and is not yet stable.
Unit tests are not yet fully implemented. Use at your own risk.
License
This project is licensed under the MIT or Apache-2.0 license. You can choose between one of them if you use this work.
SPDX-License-Identifier: MIT OR Apache-2.0
Dependencies
~2.8–8.5MB
~77K SLoC