https://github.com/axiomhq/axiom-rs
Official Rust bindings for the Axiom API
https://github.com/axiomhq/axiom-rs
async axiom client hacktoberfest http o11y rust sdk
Last synced: about 1 year ago
JSON representation
Official Rust bindings for the Axiom API
- Host: GitHub
- URL: https://github.com/axiomhq/axiom-rs
- Owner: axiomhq
- License: apache-2.0
- Created: 2022-07-05T14:27:50.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-07T10:07:40.000Z (over 1 year ago)
- Last Synced: 2025-05-04T11:50:15.120Z (about 1 year ago)
- Topics: async, axiom, client, hacktoberfest, http, o11y, rust, sdk
- Language: Rust
- Homepage: https://axiom.co
- Size: 545 KB
- Stars: 37
- Watchers: 4
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# axiom-rs [](https://docs.rs/axiom-rs/) [](https://github.com/axiomhq/axiom-rs/actions?query=workflow%3ACI) [](https://crates.io/crates/axiom-rs) [](LICENSE-APACHE)
```rust,no_run
use axiom_rs::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box> {
// 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
```sh
cargo add axiom-rs
```
## Optional features
You can use the [Cargo features](https://doc.rust-lang.org/stable/cargo/reference/features.html#the-features-section):
- `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](https://axiom.co/docs/guides/rust).
## License
[MIT](LICENSE-MIT) or [Apache](LICENSE-APACHE)