Skip to content

Commit 6d2a1e3

Browse files
committed
add apps and others manually to ingest options script
1 parent 8bd488c commit 6d2a1e3

File tree

11 files changed

+97
-22
lines changed

11 files changed

+97
-22
lines changed

guides/apex.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Axiom Go Adapter for apex/log'
3+
description: 'Adapter to ship logs generated by apex/log to Axiom.'
4+
overview: 'Minimalistic logging library for Go'
5+
sidebarTitle: 'Apex'
6+
url: 'https://pkg.go.dev/github.com/axiomhq/axiom-go/adapters/apex'
7+
tags: ['go', 'golang', 'apex']
8+
logoId: 'apex'
9+
---

guides/logrus.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Axiom Go Adapter for sirupsen/logrus'
3+
description: 'Adapter to ship logs generated by sirupsen/logrus to Axiom.'
4+
overview: 'Structured logger for Go'
5+
sidebarTitle: 'Logrus'
6+
url: 'https://pkg.go.dev/github.com/axiomhq/axiom-go/adapters/logrus'
7+
tags: ['go', 'golang', 'logrus']
8+
logoId: 'logrus'
9+
---

guides/pino.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
title: 'Axiom transport for Pino logger'
33
description: 'This page explains how to send data from a Node.js app to Axiom through Pino.'
4+
overview: 'Fast JSON logger for Node.js'
45
sidebarTitle: Pino
56
tags: ['js', 'pino', 'winston', 'node', 'javascript', 'typescript', 'ts']
7+
logoId: 'pino'
68
---
79

810
import Prerequisites from "/snippets/standard-prerequisites.mdx"
@@ -44,4 +46,4 @@ logger.info('Hello from Pino!');
4446

4547
## Examples
4648

47-
For more examples, see the [examples in GitHub](https://github.com/axiomhq/axiom-js/tree/main/examples/pino).
49+
For more examples, see the [examples in GitHub](https://github.com/axiomhq/axiom-js/tree/main/examples/pino).

guides/winston.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
title: 'Axiom transport for Winston logger'
33
description: 'This page explains how to send data from a Node.js app to Axiom through Winston.'
4+
overview: 'A logger for just about everything'
45
sidebarTitle: Winston
56
tags: ['js', 'pino', 'winston', 'node', 'javascript', 'typescript', 'ts']
7+
logoId: 'winston'
68
---
79

810
import Prerequisites from "/snippets/standard-prerequisites.mdx"

guides/zap.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Axiom adapter for Zap logger'
3+
description: 'Adapter to ship logs generated by uber-go/zap to Axiom.'
4+
overview: 'Blazing fast, structured, leveled logging in Go'
5+
sidebarTitle: 'Zap'
6+
url: 'https://pkg.go.dev/github.com/axiomhq/axiom-go/adapters/zap'
7+
tags: ['go', 'golang', 'zap']
8+
logoId: 'zap'
9+
---

ingest-options.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

mint.json

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
"guides/opentelemetry-django",
125125
"guides/go",
126126
"guides/opentelemetry-go",
127+
"guides/apex",
128+
"guides/logrus",
129+
"guides/zap",
127130
"guides/opentelemetry-java",
128131
"guides/javascript",
129132
"guides/send-logs-from-laravel",
@@ -202,10 +205,7 @@
202205
{
203206
"group": "Monitors",
204207
"icon": "desktop",
205-
"pages": [
206-
"monitor-data/monitors",
207-
"monitor-data/pagerduty"
208-
]
208+
"pages": ["monitor-data/monitors", "monitor-data/pagerduty"]
209209
}
210210
]
211211
},
@@ -278,10 +278,7 @@
278278
},
279279
{
280280
"group": "Get Started",
281-
"pages": [
282-
"apl/introduction",
283-
"apl/tutorial"
284-
]
281+
"pages": ["apl/introduction", "apl/tutorial"]
285282
},
286283
{
287284
"group": "Functions",
@@ -418,9 +415,7 @@
418415
},
419416
{
420417
"group": "User Endpoints",
421-
"pages": [
422-
"restapi/endpoints/getCurrentUser"
423-
]
418+
"pages": ["restapi/endpoints/getCurrentUser"]
424419
},
425420
{
426421
"group": "Dataset Endpoints",

reference/cli.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
22
title: 'Axiom CLI'
3+
sidebarTitle: 'CLI'
34
description: 'Learn how to use the Axiom CLI to ingest data, manage authentication state, and configure multiple deployments.'
5+
overview: 'Command-line interface for interacting with Axiom programmatically'
46
tags:
5-
['axiom documentation', 'documentation', 'axiom', 'reference', 'settings', 'field restrictions', 'libraries', 'cli', 'axiom cli']
7+
['terminal', 'shell', 'axiom documentation', 'documentation', 'axiom', 'reference', 'settings', 'field restrictions', 'libraries', 'cli', 'axiom cli']
8+
logoId: 'cli'
9+
darkLogoId: 'clidark'
610
---
711

812
Axiom’s command line interface (CLI) is an Axiom tool that lets you test, manage, and build your Axiom projects by typing commands on the command-line.
@@ -78,7 +82,7 @@ To view available environment variables, run `axiom help environment` for an up
7882
AXIOM_DEPLOYMENT: The deployment to use. Overwrites the choice loaded
7983
from the configuration file.
8084
81-
AXIOM_ORG_ID: The organization ID of the organization the access
85+
AXIOM_ORG_ID: The organization ID of the organization the access
8286
token is valid for.
8387
8488
AXIOM_PAGER, PAGER (in order of precedence): A terminal paging
@@ -90,15 +94,15 @@ loaded from the configuration file.
9094
AXIOM_URL: The deployment url to use. Overwrites the choice loaded
9195
from the configuration file.
9296
93-
VISUAL, EDITOR (in order of precedence): The editor to use for
97+
VISUAL, EDITOR (in order of precedence): The editor to use for
9498
authoring text.
9599
96100
NO_COLOR: Set to any value to avoid printing ANSI escape sequences
97101
for color output.
98102
99103
CLICOLOR: Set to "0" to disable printing ANSI colors in output.
100104
101-
CLICOLOR_FORCE: Set to a value other than "0" to keep ANSI colors in
105+
CLICOLOR_FORCE: Set to a value other than "0" to keep ANSI colors in
102106
output even when the output is piped.
103107
```
104108

restapi/introduction.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
---
22
title: 'Get Started with Axiom API'
33
description: 'Learn how to ingest structured data logs, handle queries, and manage your deployments using the API.'
4+
overview: 'Standard interface for HTTP-based application programming'
45
sidebarTitle: Introduction
56
tags:
67
['axiom documentation', 'documentation', 'axiom', 'axiom api', 'rest api', 'rest', 'content type', 'datasets', 'authentication', 'string', 'boolean', 'integer', 'float', 'map', 'list']
8+
logoId: 'http'
9+
enlargeLogo: true
710
---
811

912
Axiom understands your resources and provides an API to ingest structured data logs, handle queries, and manage your deployments. This REST-style API uses JSON for serialization and gives you complete control over the entire Axiom platform.

scripts/generate-ingest-options.mjs

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,25 @@ import YAML from "yaml";
44
const generateList = async () => {
55
const data = await readFile("mint.json", "utf-8");
66
const mint = JSON.parse(data);
7-
const groups = mint.navigation[1].pages.filter((p) => p.group);
7+
// get the collectors, technologies and any send-data method but also include integrations
8+
let groups = mint.navigation[1].pages.filter((p) => p.group);
9+
// unfortunately the integration group has other stuff than sending data
10+
// so we need to filter it out.
11+
groups.push({
12+
group: "Apps & Integraitons",
13+
pages: [
14+
"apps/cloudflare-logpush",
15+
"apps/netlify",
16+
"apps/tailscale",
17+
"apps/vercel",
18+
],
19+
});
20+
// the API and CLI group is not included in the navigation
21+
// so we need to add it manually
22+
groups.push({
23+
group: "Other",
24+
pages: ["restapi/introduction", "reference/cli"],
25+
});
826

927
const options = await Promise.all(
1028
groups.map(async (group) => {
@@ -18,6 +36,9 @@ const generateList = async () => {
1836
}),
1937
);
2038

39+
// overide rest api name to be more descriptive
40+
options[options.length - 1][0].name = "REST API";
41+
2142
return options.flat();
2243
};
2344

@@ -26,6 +47,11 @@ const parsePageInfo = async (path, group) => {
2647
// capture frontmatter header only
2748
const text = f.match(/---([\s\S]*?)---/)[0];
2849
const data = YAML.parse(text.replaceAll("---", ""));
50+
51+
// rename sidebarTitle to name
52+
data.name = data.sidebarTitle;
53+
delete data.sidebarTitle;
54+
2955
return {
3056
group,
3157
url: `https://axiom.co/docs/${path}`,
@@ -35,16 +61,30 @@ const parsePageInfo = async (path, group) => {
3561

3662
const main = async () => {
3763
const ingestOptions = await generateList();
38-
console.log(ingestOptions);
64+
console.log(
65+
`found ${ingestOptions.length} ingest options categorized as follows:`,
66+
);
67+
// print stats
68+
const stats = {};
69+
for (const opt of ingestOptions) {
70+
if (stats[opt.group]) {
71+
stats[opt.group] += 1;
72+
} else {
73+
stats[opt.group] = 1;
74+
}
75+
}
76+
for (const key of Object.keys(stats)) {
77+
console.log(`\t${key}: ${stats[key]} options`);
78+
}
3979

80+
console.log("------");
4081
console.log("writing result to file...");
4182
await writeFile(
4283
"ingest-options.json",
4384
JSON.stringify(ingestOptions),
4485
"utf-8",
4586
);
46-
console.log("result written to => ingest-options.json");
47-
console.log("done");
87+
console.log("done, result written to => ingest-options.json");
4888
};
4989

5090
await main();

send-data/datadog.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
title: 'Send data from Datadog to Axiom'
33
description: 'Send data from Datadog to Axiom.'
4+
overview: 'Send data from Datadog to Axiom.'
45
sidebarTitle: Datadog
56
tags: ['axiom documentation', 'documentation', 'axiom', 'endpoints', 'http', 'syslog', 'splunk', 'datadog', 'loki', 'honeycomb', 'javascript', 'python']
7+
logoId: 'datadog'
68
---
79

810
Sending data from Datadog to Axiom is a private preview feature available upon request.
@@ -11,4 +13,4 @@ Please [contact Axiom](https://axiom.co/migrations/datadog) to learn more about
1113

1214
<Note>
1315
You can only send logs from Datadog to Axiom. Support for metrics is coming soon.
14-
</Note>
16+
</Note>

0 commit comments

Comments
 (0)