Skip to content

Commit

Permalink
Merge pull request #223 from axiomhq/islam/simplify-readme
Browse files Browse the repository at this point in the history
simplify README files
  • Loading branch information
bahlo authored Oct 23, 2024
2 parents 816d15e + 29a0d6a commit 48dbbaa
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 40 deletions.
37 changes: 0 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,14 @@
# axiom-js

<a href="https://axiom.co">
<picture>
<source media="(prefers-color-scheme: dark) and (min-width: 600px)" srcset="https://axiom.co/assets/github/axiom-github-banner-light-vertical.svg">
<source media="(prefers-color-scheme: light) and (min-width: 600px)" srcset="https://axiom.co/assets/github/axiom-github-banner-dark-vertical.svg">
<source media="(prefers-color-scheme: dark) and (max-width: 599px)" srcset="https://axiom.co/assets/github/axiom-github-banner-light-horizontal.svg">
<img alt="Axiom.co banner" src="https://axiom.co/assets/github/axiom-github-banner-dark-horizontal.svg" align="right">
</picture>
</a>
&nbsp;

[![Workflow][workflow_badge]][workflow]
[![License][license_badge]][license]

[Axiom](https://axiom.co) unlocks observability at any scale.

- **Ingest with ease, store without limits:** Axiom’s next-generation datastore enables ingesting petabytes of data with ultimate efficiency. Ship logs from Kubernetes, AWS, Azure, Google Cloud, DigitalOcean, Nomad, and others.
- **Query everything, all the time:** Whether DevOps, SecOps, or EverythingOps, query all your data no matter its age. No provisioning, no moving data from cold/archive to “hot”, and no worrying about slow queries. All your data, all. the. time.
- **Powerful dashboards, for continuous observability:** Build dashboards to collect related queries and present information that’s quick and easy to digest for you and your team. Dashboards can be kept private or shared with others, and are the perfect way to bring together data from different sources

For more information check out the [official documentation](https://axiom.co/docs)
and our
[community Discord](https://axiom.co/discord).

## Projects

This is a monorepo consisting of the following projects:

* [`@axiomhq/js`](./packages/js): Official API bindings that let you ingest or query your data.
* [`@axiomhq/winston`](./packages/winston): A [winston](https://github.com/winstonjs/winston) transport which sends logs to Axiom.
* [`@axiomhq/pino`](./packages/pino): A [pino](https://github.com/pinojs/pino) transport which sends logs to Axiom.


## Migrate to v1.x

- Pass the credentials as an object to Axiom client, this package no longer reads them from the environment variables.
do:
```ts
const axiom = new Axiom({
token: process.env.AXIOM_TOKEN,
});
```
instead of:
```ts
const axiom = new Axiom();
```

## License

Distributed under the [MIT License](LICENSE).
Expand Down
14 changes: 14 additions & 0 deletions packages/js/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Added support for Annotations API

## Migrate to v1.x

- Pass the credentials as an object to Axiom client, this package no longer reads them from the environment variables.
do:
```ts
const axiom = new Axiom({
token: process.env.AXIOM_TOKEN,
});
```
instead of:
```ts
const axiom = new Axiom();
```

## [1.0.0-rc.4] - 2024-06-10

### Fixed
Expand Down
25 changes: 24 additions & 1 deletion packages/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,27 @@

The Axiom JavaScript SDK allows you to send data from a JavaScript app to Axiom.

For more information about how to set up and use the Axiom JavaScript SDK, see the [Axiom documentation](https://axiom.co/docs/guides/javascript).
```ts
import { Axiom } from '@axiomhq/js';

const axiom = new Axiom({
token: process.env.AXIOM_TOKEN,
});

axiom.ingest('DATASET_NAME', [{ foo: 'bar' }]);
await axiom.flush();
```

## Install

```bash
npm install @axiomhq/js
```

## Documentation

For more information about how to set up and use the Axiom JavaScript SDK, read documentation on [axiom.co/docs/guides/javascript](https://axiom.co/docs/guides/javascript).

## License

[MIT](../../LICENSE)
30 changes: 29 additions & 1 deletion packages/pino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,32 @@

The Axiom transport for Pino logger allows you to send data from a Node.js app to Axiom through Pino.

For more information about how to set up and use the Axiom transport for Pino logger, see the [Axiom documentation](https://axiom.co/docs/guides/pino).
```ts
import pino from 'pino';

const logger = pino(
{ level: 'info' },
pino.transport({
target: '@axiomhq/pino',
options: {
dataset: process.env.AXIOM_DATASET,
token: process.env.AXIOM_TOKEN,
},
}),
);
```

## Install

```bash
npm install @axiomhq/pino
```


## Documentation

For more information about how to set up and use the Axiom transport for Pino logger, see the [axiom.co/docs/guides/pino](https://axiom.co/docs/guides/pino).

## License

[MIT](../../LICENSE)
36 changes: 35 additions & 1 deletion packages/winston/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,38 @@

The Axiom transport for Winston logger allows you to send data from a Node.js app to Axiom through Winston.

For more information about how to set up and use the Axiom transport for Winston logger, see the [Axiom documentation](https://axiom.co/docs/guides/winston).

```ts
import { WinstonTransport as AxiomTransport } from '@axiomhq/winston';

const logger = winston.createLogger({
level: 'info',
format: winston.format.json(),
defaultMeta: { service: 'user-service' },
transports: [
new AxiomTransport({
dataset: 'my-dataset',
token: 'my-token',
}),
],
});

logger.log({
level: 'info',
message: 'Logger successfully setup',
});
```

## Install

```bash
npm install @axiomhq/winston
```

## Documentation

For more information about how to set up and use the Axiom transport for Winston logger, see the [axiom.co/docs/guides/winston](https://axiom.co/docs/guides/winston).

## License

[MIT](../../LICENSE)

0 comments on commit 48dbbaa

Please sign in to comment.