Crates.io | opentelemetry-log |
lib.rs | opentelemetry-log |
version | |
source | src |
created_at | 2024-10-01 07:37:17.023897 |
updated_at | 2024-10-31 09:13:37.401908 |
description | A common library for OpenTelemetry logging in Rust. |
homepage | https://github.com/vincenzopalazzo/opentelemetry-log |
repository | https://github.com/vincenzopalazzo/opentelemetry-log |
max_upload_size | |
id | 1392575 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A minimal and simple OpenTelemetry log adapter that allows you to export your Rust logs to an OpenTelemetry collector.
log
for now) frameworksAdd this to your Cargo.toml
:
[dependencies]
opentelemetry-log = "0.1"
use opentelemetry_common::Opentelemetry;
fn main() {
let mut manager = Opentelemetry::new();
manager.init_log("example", &args.level, &url)?;
// Your application code
}
This project is licensed under the GNU General Public License. See the LICENSE file for details.
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