#open-telemetry #metrics #cpu-memory #disk #export #gpu #process

opentelemetry-system-metrics

System metric export through Opentelemetry

9 releases

0.2.0 Jun 3, 2024
0.1.9 May 29, 2024
0.1.8 Mar 15, 2024
0.1.6 Nov 20, 2023
0.1.1 Jun 24, 2022

#1023 in Network programming

Download history 1084/week @ 2024-06-28 849/week @ 2024-07-05 834/week @ 2024-07-12 1143/week @ 2024-07-19 1294/week @ 2024-07-26 983/week @ 2024-08-02 1389/week @ 2024-08-09 830/week @ 2024-08-16 1509/week @ 2024-08-23 781/week @ 2024-08-30 1481/week @ 2024-09-06 1086/week @ 2024-09-13 1184/week @ 2024-09-20 1213/week @ 2024-09-27 1705/week @ 2024-10-04 1382/week @ 2024-10-11

5,547 downloads per month
Used in 2 crates (via dora-metrics)

Apache-2.0

19KB
149 lines

opentelemetry-system-metrics

This is my awesome crate enabling process level system metrics using opentelemetry.

Current metrics observed are:

  • CPU
  • Memory
  • Disk
  • Network
  • GPU Memory

Getting started

cargo add opentelemetry_system_metrics
use opentelemetry::global;
use opentelemetry_system_metrics::init_process_observer;

let meter = global::meter("process-meter");
init_process_observer(meter);

To get started with InfluxDB, you should create an account at InfluxDB Cloud, create a new telegraf opentelemetry exporter.

  • Ex:
export INFLUX_TOKEN=<PROVIDED TOKEN>
telegraf --config <PROVIDED LINK>
cargo run --example otlp-tokio-metrics

lib.rs:

This is my awesome crate Enabling system metrics from process to be observed using opentelemetry. Current metrics observed are:

  • CPU
  • Memory
  • Disk
  • Network

Getting started

use opentelemetry::global;
use opentelemetry_system_metrics::init_process_observer;

let meter = global::meter("process-meter");
init_process_observer(meter);

Dependencies

~5MB
~93K SLoC