A minimal and simple OpenTelemetry log adapter that allows you to export your Rust logs to an OpenTelemetry collector.
- Export Rust logs to an OpenTelemetry collector
- Minimal and simple adapter
- Easy integration with existing logging (just
log
for now) frameworks
Add 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