13 releases (breaking)
new 0.11.1 | May 16, 2025 |
---|---|
0.11.0 | Sep 13, 2024 |
0.10.0 | Jun 17, 2024 |
0.9.0 | Nov 30, 2023 |
0.2.1 | Jul 22, 2022 |
#77 in HTTP client
24,890 downloads per month
Used in tracing-layer-axiom
110KB
2.5K
SLoC
axiom-rs

use axiom_rs::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Auto-configure the client from the environment variable AXIOM_TOKEN:
let client = Client::new()?;
client
.ingest(
"DATASET_NAME",
vec![json!({
"foo": "bar",
})],
)
.await?;
let _res = client
.query(r#"['DATASET_NAME'] | where foo == "bar" | limit 100"#, None)
.await?;
Ok(())
}
Install
cargo add axiom-rs
Optional features
You can use the Cargo features:
default-tls
: Provides TLS support to connect over HTTPS. Enabled by default.native-tls
: Enables TLS functionality provided bynative-tls
.rustls-tls
: Enables TLS functionality provided byrustls
.tokio
: Enables usage with thetokio
runtime. Enabled by default.async-std
: Enables usage with theasync-std
runtime.
Documentation
Read documentation on axiom.co/docs/guides/rust.
License
Dependencies
~9–23MB
~340K SLoC