examples

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 0 Imported by: 0

README

Examples

Before you start

Axiom Go and the Adapters automatically pick up their configuration from the environment, if not otherwise specified. To learn more about cunfiguration, check the Documentation.

To quickstart, export the environment variables below.

When using Axiom Cloud
  • AXIOM_TOKEN: Personal Access or Ingest token. Can be created under Profile or Settings > Ingest Tokens. For security reasons it is advised to use an Ingest Token with minimal privileges only.
  • AXIOM_ORG_ID: Organization identifier of the organization to use on Axiom Cloud.
  • AXIOM_DATASET: Dataset to use. Must exist prior to using it.
When using Axiom Selfhost
  • AXIOM_URL: URL of the Axiom deployment to use.
  • AXIOM_TOKEN: Personal Access or Ingest token. Can be created under Profile or Settings > Ingest Tokens. For security reasons it is advised to use an Ingest Token with minimal privileges only.
  • AXIOM_DATASET: Dataset to use. Must exist prior to using it.

Package usage

  • ingestfile: How to ingest the contents of a file into Axiom and compress them on the fly.
  • query: How to query a dataset using the Kusto-like Axiom Processing Language (APL).

Adapter usage

  • apex: How to ship logs to Axiom using the popular Apex logging package.
  • logrus: How to ship logs to Axiom using the popular Logrus logging package.
  • zap: How to ship logs to Axiom using the popular Zap logging package.

Documentation

Overview

Package examples contains code examples on how to use Axiom Go.

Directories

Path Synopsis
The purpose of this example is to show how to integrate with apex.
The purpose of this example is to show how to integrate with apex.
The purpose of this example is to show how to stream the contents of a JSON logfile and gzip them on the fly.
The purpose of this example is to show how to stream the contents of a JSON logfile and gzip them on the fly.
The purpose of this example is to show how to integrate with logrus.
The purpose of this example is to show how to integrate with logrus.
The purpose of this example is to show how to query a dataset using the Axiom Processing Language (APL).
The purpose of this example is to show how to query a dataset using the Axiom Processing Language (APL).
The purpose of this example is to show how to integrate with zap.
The purpose of this example is to show how to integrate with zap.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL