You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3,165 +3,60 @@ title: 'Get started with example app'
3
3
excerpt: 'This page explains how to try out Axiom with an example app.'
4
4
---
5
5
6
-
Axiom enables you to query your event data without compromises: all your data, all the time, for all possible needs. No sampling, no waiting, and no extravagant bills.
7
-
8
-
This page explains how to try out Axiom with an example Node.js app that emits OpenTelemetry trace data. There are many others ways you can send data to Axiom. For a full list, see [Send data](/send-data/ingest).
6
+
This page explains how to try out Axiom with an example app that emits OpenTelemetry (OTel) trace data. There are many others ways you can send data to Axiom. For a full list, see [Send data](/send-data/ingest).
7
+
8
+
Choose one of the following example apps:
9
+
10
+
<CardGroupcols={2}>
11
+
<Card
12
+
title=".NET"
13
+
href="/guides/opentelemetry-dotnet"
14
+
>
15
+
</Card>
16
+
17
+
<Card
18
+
title="Django"
19
+
href="/guides/opentelemetry-django"
20
+
>
21
+
</Card>
22
+
23
+
<Card
24
+
title="Golang"
25
+
href="/guides/opentelemetry-go"
26
+
>
27
+
</Card>
28
+
29
+
<Card
30
+
title="Java"
31
+
href="/guides/opentelemetry-java"
32
+
>
33
+
</Card>
34
+
35
+
<Card
36
+
title="Next.js"
37
+
href="/guides/opentelemetry-nextjs"
38
+
>
39
+
</Card>
40
+
41
+
<Card
42
+
title="Node.js"
43
+
href="/guides/opentelemetry-nodejs"
44
+
>
45
+
</Card>
46
+
47
+
<Card
48
+
title="Python"
49
+
href="/guides/opentelemetry-python"
50
+
>
51
+
</Card>
52
+
53
+
<Card
54
+
title="Ruby on Rails"
55
+
href="/guides/opentelemetry-ruby"
56
+
>
57
+
</Card>
58
+
</CardGroup>
9
59
10
60
To try out Axiom without registration, see [Explore Axiom Playground](/getting-started-guide/explore-axiom-playground).
11
61
12
-
To try out Axiom with sample data, see [Quickstart using sample data](getting-started-guide/quickstart-using-sample-data).
13
-
14
-
## 1. Set up Axiom
15
-
16
-
To set up Axiom to receive data, first [sign up for a free Axiom account](https://app.axiom.co/register). All you need is an email address.
17
-
18
-
### Create a dataset
19
-
20
-
In Axiom, an individual piece of data is an event, and a dataset is a collection of similar events. In this example, events are emitted by the sample app, and the dataset contains the incoming event data.
21
-
22
-
1. Click <imgsrc="/doc-assets/icons/settings.svg"className="inline-icon"alt="Settings icon" /> **Settings > Datasets**, and then click **New dataset**.
23
-
2. Name your dataset **test-dataset**, and then click **Add**.
24
-
25
-
This creates a dataset in your account where you will send event data.
An API token is a form of authentication that enables you to send data to Axiom. Keep it confidential because anyone with this key can send data to your Axiom dataset.
35
-
36
-
1. Click <imgsrc="/doc-assets/icons/settings.svg"className="inline-icon"alt="Settings icon" /> **Settings > API tokens**, and then click **New API token**.
37
-
2. Name your API token **test-token**.
38
-
3. In **Dataset access**, select **test-dataset**.
39
-
4. Click **Add**.
40
-
5. Copy the API token that appears and store it securely. It won't be displayed again.
41
-
42
-
This creates an API token that you will use to authenticate requests to send data to Axiom.
2. Clone the [`otlp-exporter-node` example from OpenTelemetry](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/otlp-exporter-node).
53
-
3. In the `tracing.js` file, edit the code that creates the `OTLPTraceExporter` object. Replace `AXIOM_API_TOKEN` with the Axiom API token you have generated.
54
-
55
-
```js
56
-
constexporter=newOTLPTraceExporter({
57
-
url:'https://api.axiom.co/v1/traces',
58
-
headers: {
59
-
'Authorization':'Bearer AXIOM_API_TOKEN',
60
-
'X-Axiom-Dataset':'test-dataset'
61
-
},
62
-
});
63
-
```
64
-
65
-
4. In your terminal, go to the root folder of the example app. Run the following to install dependencies and start the app three times:
66
-
67
-
```shell
68
-
npm i
69
-
npm run start:tracing
70
-
npm run start:tracing
71
-
npm run start:tracing
72
-
```
73
-
74
-
This connects the example app to Axiom. Every time the app runs, it sends event data to Axiom.
75
-
76
-
## 3. Analyze data
77
-
78
-
### Display stream of incoming data
79
-
80
-
1. Click the **Stream** tab on the top of the page.
81
-
2. Click **test-dataset** in the list.
82
-
83
-
You see the event data that Axiom receives realtime.
1. Click the **Datasets** tab on the top of the page, and then click **test-dataset**. This tab enables you to query your data with a visual query editor.
93
-
2. In the **Visualize** section, click **+**.
94
-
3. Write `histogram(duration, 15)`, and then press **Enter**.
### Run a query with Axiom Processing Language (APL)
105
-
106
-
1. Click the **Explore** tab on the top of the page, and then click your dataset. This tab enables you to query your data using the Axiom Processing Language (APL). For more information, see [Introduction to APL](/apl/introduction).
107
-
2. In the text field, enter the following:
108
-
```apl copy
109
-
['test-dataset']
110
-
| where duration > 1000000
111
-
| take 1000
112
-
```
113
-
3. Click **Run query**.
114
-
115
-
You see the events that took longer than 1 ms. In the query above, you see one million because time in the `duration` field is stored in nanoseconds.
1. Click the **Dashboards** tab on the top of the page, and then click **OpenTelemetry Traces (test-dataset)**. You see data about incoming traces and spans. Whenever Axiom detects known schemas like OpenTelemetry, it automatically creates dashboards for you.
125
-
2. The `Slowest Operations` chart shows the list of services. Click `basic-service` to display the traces of this service.
126
-
3. Click one of the traces in the list.
127
-
128
-
You see a waterfall view of spans that displays each span in the trace and their duration.
Set up a monitor to receive alerts if certain conditions about your event data are met.
155
-
156
-
1. Click the **Monitors** tab on the top of the page, and then click **New monitor**.
157
-
2. Click **Add notifier**, and then select **Email: test-notifier**.
158
-
3. Click **Simple Query Builder**.
159
-
4. In **Dataset**, select **test-dataset**.
160
-
5. Click **Create**.
161
-
162
-
You created a monitor that automatically sends a notification to your email address if the number of events Axiom receives is higher than 1,000 in ten minutes.
For a more educational experience that explains the most important concepts and ideas behind Axiom and how your organization can benefit from Axiom’s offering, see [Learn about Axiom](/getting-started-guide/learn-about-axiom).
0 commit comments