4 releases

0.1.3 Oct 31, 2024
0.1.2 Oct 30, 2024
0.1.1 Oct 24, 2024
0.1.0 Oct 1, 2024

#2007 in Development tools

Download history 223/week @ 2024-09-28 98/week @ 2024-10-05 179/week @ 2024-10-12 193/week @ 2024-10-19 353/week @ 2024-10-26 135/week @ 2024-11-02 63/week @ 2024-11-09 93/week @ 2024-11-16 73/week @ 2024-11-23 141/week @ 2024-11-30

381 downloads per month

GPL-2.0 license

57KB
80 lines

opentelemetry-log

CI Latest Version License

A minimal and simple OpenTelemetry log adapter that allows you to export your Rust logs 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.

How to Deploy OpenTelemetry with Grafana

How to inspect the logs is something that is dependent on the user, but if you are starting from scratch and you want to learn how to work with Grafana and OpenTelemetry, I suggest starting from here: https://github.com/grafana/docker-otel-lgtm

Dependencies

~9–20MB
~272K SLoC