#open-telemetry #cpu-memory #metrics #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

#34 in #cpu-memory

Download history 1774/week @ 2024-09-23 887/week @ 2024-09-30 1928/week @ 2024-10-07 1157/week @ 2024-10-14 691/week @ 2024-10-21 1322/week @ 2024-10-28 1268/week @ 2024-11-04 2158/week @ 2024-11-11 1776/week @ 2024-11-18 1836/week @ 2024-11-25 1935/week @ 2024-12-02 1583/week @ 2024-12-09 580/week @ 2024-12-16 587/week @ 2024-12-23 1227/week @ 2024-12-30 1517/week @ 2025-01-06

3,959 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