The Axiom Rust SDK is an open-source project and welcomes your contributions. For more information, see the GitHub repository.
Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
- Create an API token in Axiom with permissions to update the dataset you have created.
Install SDK
Add the following to yourCargo.toml
:
VERSION
with the latest version number specified on the GitHub Releases page. For example, 0.11.0
.
If you use the Axiom CLI, run eval $(axiom config export -f)
to configure your environment variables. Otherwise, create an API token and export it as AXIOM_TOKEN
.
Use client
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.