14 releases
0.0.3-alpha.1 | Jun 5, 2024 |
---|---|
0.0.2-alpha.1 | Oct 16, 2023 |
0.0.1-alpha.11 | Aug 4, 2023 |
0.0.1-alpha.9 | Jul 31, 2023 |
#600 in Development tools
2,220 downloads per month
Used in 4 crates
(via influxive)
39KB
866 lines
Opentelemetry metrics bindings for influxive-child-svc.
Example
use influxive_writer::*;
// create an influxive writer
let writer = InfluxiveWriter::with_token_auth(
InfluxiveWriterConfig::default(),
"http://127.0.0.1:8086",
"my.bucket",
"my.token",
);
// register the meter provider
opentelemetry_api::global::set_meter_provider(
influxive_otel::InfluxiveMeterProvider::new(
Default::default(),
Arc::new(writer),
)
);
// create a metric
let m = opentelemetry_api::global::meter("my.meter")
.f64_histogram("my.metric")
.init();
// make a recording
m.record(3.14, &[]);
Dependencies
~4–12MB
~112K SLoC