Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axiomhq/axiom-rs
Official Rust bindings for the Axiom API
https://github.com/axiomhq/axiom-rs
async axiom client http o11y rust sdk
Last synced: about 1 month 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-30T10:52:01.000Z (about 1 year ago)
- Last Synced: 2024-03-15T08:50:31.132Z (10 months ago)
- Topics: async, axiom, client, http, o11y, rust, sdk
- Language: Rust
- Homepage: https://axiom.co
- Size: 264 KB
- Stars: 28
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# axiom-rs [![docs.rs](https://docs.rs/axiom-rs/badge.svg)](https://docs.rs/axiom-rs/) [![build](https://img.shields.io/github/actions/workflow/status/axiomhq/axiom-rs/ci.yaml?branch=main&ghcache=unused)](https://github.com/axiomhq/axiom-rs/actions?query=workflow%3ACI) [![crates.io](https://img.shields.io/crates/v/axiom-rs.svg)](https://crates.io/crates/axiom-rs) [![License](https://img.shields.io/crates/l/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)