#open-telemetry

opentelemetry-common

A common library for OpenTelemetry logging in Rust

1 unstable release

0.1.0 Oct 1, 2024

#1180 in Development tools

Download history 130/week @ 2024-09-26 36/week @ 2024-10-03 5/week @ 2024-10-10

171 downloads per month

GPL-2.0 license

25KB
72 lines

opentelemetry-log

CI Latest Version License

A minimal and simple opentelemetry log adapter that allow you to export your rust log to an opentelemetry collector

Features

  • Export Rust logs to an OpenTelemetry collector
  • Minimal and simple adapter
  • Easy integration with existing logging (just log for now) frameworks

Installation

Add this to your Cargo.toml:

[dependencies]
opentelemetry-log = "0.1"

Usage

use opentelemetry_common::Opentelemetry;

fn main() {
    let mut manager = Opentelemetry::new();
    manager.init_log("example", &args.level, &url)?;
    // Your application code
}

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE. See the LICENSE file for details.

Dependencies

~9–21MB
~309K SLoC