#tracing-layer #logging-tracing #tracing #logging #profiling

venator

A tracing layer for exporting logs and spans to the Venator app

4 releases (2 stable)

1.1.0 Jan 28, 2025
1.0.0 Jan 15, 2025
0.2.0 Nov 13, 2024
0.1.0 Sep 12, 2024

#539 in Debugging

Download history 129/week @ 2024-11-13 12/week @ 2024-11-20 3/week @ 2024-11-27 19/week @ 2024-12-04 15/week @ 2024-12-11 135/week @ 2025-01-15 64/week @ 2025-01-22 99/week @ 2025-01-29 302/week @ 2025-02-05 259/week @ 2025-02-12 228/week @ 2025-02-19 8/week @ 2025-02-26

801 downloads per month

MIT license

34KB
717 lines

The Venator Rust library provides a tracing layer that will export logs and spans to the Venator app.

Usage

[dependencies]
venator = "1.1.0"

Install it as the global subscriber:

use venator::Venator;

// minimal
Venator::default().install();
use venator::Venator;

// configured
Venator::builder()
    .with_host("localhost:8362")
    .with_attribute("service", "my_app")
    .with_attribute("environment.name", "internal")
    .with_attribute("environment.dev", true)
    .build()
    .install();

Or use it as a Layer:

use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt;
use venator::Venator;

tracing_subscriber::registry()
    .with(Venator::default())
    .with(tracing_subscriber::fmt::Layer::default())
    .with(tracing_subscriber::EnvFilter::from_default_env())
    .init()

Dependencies

~1.9–9MB
~82K SLoC