opentelemetry-common

Crates.ioopentelemetry-common
lib.rsopentelemetry-common
version0.1.0
sourcesrc
created_at2024-10-01 07:28:21.131129
updated_at2024-10-01 07:28:21.131129
descriptionA common library for OpenTelemetry logging in Rust.
homepagehttps://github.com/vincent/opentelemetry-log
repositoryhttps://github.com/vincent/opentelemetry-log
max_upload_size
id1392566
size80,101
Vincenzo Palazzo (vincenzopalazzo)

documentation

https://docs.rs/opentelemetry-common

README

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.

Commit count: 0

cargo fmt