opentelemetry-system-metrics

Crates.ioopentelemetry-system-metrics
lib.rsopentelemetry-system-metrics
version0.2.0
sourcesrc
created_at2022-06-24 09:56:12.636041
updated_at2024-06-03 14:58:38.623483
descriptionSystem metric export through Opentelemetry
homepage
repositoryhttps://github.com/haixuanTao/opentelemetry-system-metrics
max_upload_size
id612328
size64,603
Haixuan Xavier Tao (haixuanTao)

documentation

README

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
Commit count: 42

cargo fmt