@axiomhq/js
v1.8.0
Published
The official javascript bindings for the Axiom API
Readme
Axiom JavaScript SDK
The Axiom JavaScript SDK allows you to send data from a JavaScript app to Axiom.
import { Axiom } from '@axiomhq/js';
const axiom = new Axiom({
token: process.env.AXIOM_TOKEN,
axiomClient: 'my-app/1.0',
});
axiom.ingest('DATASET_NAME', [{ foo: 'bar' }]);
await axiom.flush();Custom products are appended to the X-Axiom-Client header, for example axiom-js/<version> my-app/1.0.
You can also append products after creating the client with axiom.appendAxiomClient('my-integration/1.0').
Requirements
Node.js 20 or higher is required. Node.js 18 is no longer supported.
Install
npm install @axiomhq/jsDocumentation
For more information about how to set up and use the Axiom JavaScript SDK, read documentation on axiom.co/docs/guides/javascript.
