13 releases (breaking)

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

#628 in Network programming

Download history 1941/week @ 2025-02-20 2270/week @ 2025-02-27 2579/week @ 2025-03-06 3116/week @ 2025-03-13 3116/week @ 2025-03-20 3185/week @ 2025-03-27 4692/week @ 2025-04-03 8160/week @ 2025-04-10 5823/week @ 2025-04-17 3421/week @ 2025-04-24 6312/week @ 2025-05-01 8099/week @ 2025-05-08 6537/week @ 2025-05-15 6836/week @ 2025-05-22 10269/week @ 2025-05-29 5739/week @ 2025-06-05

31,557 downloads per month
Used in tracing-layer-axiom

MIT/Apache

110KB
2.5K SLoC

axiom-rs docs.rs build crates.io License

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 by native-tls.
  • rustls-tls: Enables TLS functionality provided by rustls.
  • tokio: Enables usage with the tokio runtime. Enabled by default.
  • async-std: Enables usage with the async-std runtime.

Documentation

Read documentation on axiom.co/docs/guides/rust.

License

MIT or Apache

Dependencies

~9–23MB
~346K SLoC

OSZAR »