This page explains how to send data from a Go app to Axiom.
To send data from a Go app to Axiom, use the Axiom Go SDK.
The Axiom Go SDK is an open-source project and welcomes your contributions. For more information, see the GitHub repository.
To install the SDK, run the following:
Import the package:
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
.
Alternatively, configure the client using options passed to the axiom.NewClient
function:
Create and use a client in the following way:
For more examples, see the examples in GitHub.
To use a logging package, see the adapters in GitHub.
This page explains how to send data from a Go app to Axiom.
To send data from a Go app to Axiom, use the Axiom Go SDK.
The Axiom Go SDK is an open-source project and welcomes your contributions. For more information, see the GitHub repository.
To install the SDK, run the following:
Import the package:
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
.
Alternatively, configure the client using options passed to the axiom.NewClient
function:
Create and use a client in the following way:
For more examples, see the examples in GitHub.
To use a logging package, see the adapters in GitHub.