| Crates.io | venator |
| lib.rs | venator |
| version | 1.1.0 |
| created_at | 2024-09-12 04:27:24.769193+00 |
| updated_at | 2025-01-28 15:48:26.524783+00 |
| description | A tracing layer for exporting logs and spans to the Venator app |
| homepage | |
| repository | https://github.com/kmdreko/venator |
| max_upload_size | |
| id | 1372475 |
| size | 33,618 |
The Venator Rust library provides a tracing layer that will export logs and spans to the Venator app.
[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()