Skip to content

Commit 63bb181

Browse files
committed
Add comprehensive guide for exporting OpenTelemetry data to Honeycomb, including prerequisites, API key configuration, and step-by-step instructions for setting up trace and logs destinations in the Cloudflare dashboard. Update Worker configuration example using WranglerConfig for clarity. Additionally, enhance the known limitations section with a new call-out for user awareness.
1 parent 8d1caa8 commit 63bb181

File tree

3 files changed

+205
-1
lines changed

3 files changed

+205
-1
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
pcx_content_type: how-to
3+
title: Export to Axiom
4+
sidebar:
5+
order: 3
6+
---
7+
8+
import {WranglerConfig} from "~/components";
9+
10+
Axiom is a serverless log analytics platform that helps you store, search, and analyze massive amounts of data. By exporting your Cloudflare Workers application telemetry to Axiom, you can:
11+
- Store and query logs and traces at scale
12+
- Create dashboards and alerts to monitor your Workers
13+
14+
This guide will walk you through exporting OpenTelemetry-compliant traces and logs to Axiom from your Cloudflare Worker application
15+
16+
## Prerequisites
17+
18+
Before you begin, ensure you have:
19+
20+
- An active [Axiom account](https://app.axiom.co/register) (free tier available)
21+
- A deployed Worker that you want to monitor
22+
- An Axiom dataset to send data to
23+
24+
## Step 1: Create a dataset
25+
26+
If you don't already have a dataset to send data to:
27+
1. Log in to your [Axiom account](https://app.axiom.co/)
28+
2. Navigate to **Datasets** in the left sidebar
29+
3. Click **New Dataset**
30+
4. Enter a name (e.g. `cloudflare-workers-otel`)
31+
5. Click **Create Dataset**
32+
33+
## Step 2: Get your Axiom API token and dataset
34+
35+
1. Navigate to **Settings** in the left sidebar
36+
2. Click on **API Tokens**
37+
3. Click **Create API Token**
38+
4. Configure your API token:
39+
- **Name**: Enter a descriptive name (e.g., `cloudflare-workers-otel`)
40+
- **Permissions**: Select **Ingest** permission (required for sending telemetry data)
41+
- **Datasets**: Choose which datasets this token can write to, or select **All Datasets**
42+
5. Click **Create**
43+
6. **Important**: Copy the API token immediately and store it securely - you won't be able to see it again
44+
45+
The API token will look something like: `xaat-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
46+
47+
## Step 3: Configure Cloudflare destinations
48+
49+
Now you'll create destinations in the Cloudflare dashboard that point to Axiom.
50+
51+
### Axiom OTLP endpoints
52+
53+
Axiom provides separate OTLP endpoints for traces and logs:
54+
- **Traces**: `https://api.axiom.co/v1/traces`
55+
- **Logs**: `https://api.axiom.co/v1/logs`
56+
57+
### Configure trace or logs destination
58+
59+
1. Navigate to your Cloudflare account's [Workers Observability](https://dash.cloudflare.com/?to=/:account/workers-and-pages/observability/pipelines) section
60+
2. Click **Add destination**
61+
3. Configure your trace destination:
62+
- **Destination Name**: `axiom-traces` (or any descriptive name)
63+
- **Destination Type**: Select **Traces**
64+
- **OTLP Endpoint**: `https://api.axiom.co/v1/traces` (or `/v1/logs`)
65+
- **Custom Headers**: Add two required headers:
66+
- Authentication header
67+
- Header name: `Authorization`
68+
- Header value: `Bearer <your-api-token>`
69+
- Dataset header:
70+
- Header name: `X-Axiom-Dataset`
71+
- Header value: Your dataset name (e.g., `cloudflare-workers-otel`)
72+
4. Click **Save**
73+
74+
## Step 3: Configure your Worker
75+
76+
With your destinations created in the Cloudflare dashboard, update your Worker's configuration to enable telemetry export.
77+
78+
<WranglerConfig>
79+
80+
```json
81+
{
82+
"observability": {
83+
"traces": {
84+
"enabled": true,
85+
// Must match the destination name in the dashboard
86+
"destinations": ["axiom-traces"]
87+
},
88+
"logs": {
89+
"enabled": true,
90+
// Must match the destination name in the dashboard
91+
"destinations": ["axiom-logs"]
92+
}
93+
}
94+
}
95+
```
96+
97+
</WranglerConfig>
98+
99+
After updating your configuration, deploy your Worker for the changes to take effect.
100+
101+
:::note
102+
It may take a few minutes after deployment for data to appear in Axiom.
103+
:::
104+

src/content/docs/workers/observability/exporting-opentelemetry-data/honeycomb.mdx

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,102 @@ sidebar:
55
order: 1
66
---
77

8+
import {WranglerConfig} from "~/components";
9+
10+
Honeycomb is an observability platform built for high-cardinality data that helps you understand and debug your applications. By exporting your Cloudflare Workers application telemetry to Honeycomb, you can:
11+
- Visualize traces to understand request flows and identify performance bottlenecks
12+
- Query and analyze logs with unlimited dimensionality across any attribute
13+
- Create custom queries and dashboards to monitor your Workers
14+
15+
This guide will walk you through configuring your Cloudflare Worker application to export OpenTelemetry-compliant traces and logs to Honeycomb.
16+
17+
## Prerequisites
18+
19+
Before you begin, ensure you have:
20+
21+
- An active [Honeycomb account](https://ui.honeycomb.io/signup) (free tier available)
22+
- A deployed Worker that you want to monitor
23+
24+
## Step 1: Get your Honeycomb API key
25+
26+
1. Log in to your [Honeycomb account](https://ui.honeycomb.io/)
27+
2. Navigate to your account settings by clicking on your profile icon in the top right
28+
3. Select **Team Settings**
29+
4. In the left sidebar, click **Environments** and click the gear icon
30+
5. Find your environment (e.g., `production`, `test`) or create a new one
31+
6. Under **API Keys**, click **Create Ingest API Key**
32+
7. Configure your API key:
33+
- **Name**: Enter a descriptive name (e.g., `cloudflare-workers-otel`)
34+
- **Permissions**: Select **Can create services/datasets** (required for OTLP ingestion)
35+
8. Click **Create**
36+
9. **Important**: Copy the API key immediately and store it securely - you won't be able to see it again
37+
38+
The API key will look something like: `hcaik_01hq...`
39+
40+
## Step 2: Configure Cloudflare destinations
41+
42+
Now you'll create destinations in the Cloudflare dashboard that point to Honeycomb.
43+
44+
### Honeycomb OTLP endpoints
45+
46+
Honeycomb provides separate OTLP endpoints for traces and logs:
47+
- **Traces**: `https://api.honeycomb.io/v1/traces`
48+
- **Logs**: `https://api.honeycomb.io/v1/logs`
49+
50+
### Configure trace destination
51+
52+
1. Navigate to your Cloudflare account's [Workers Observability](https://dash.cloudflare.com/?to=/:account/workers-and-pages/observability/pipelines) section
53+
2. Click **Add destination**
54+
3. Configure your trace destination:
55+
- **Destination Name**: `honeycomb-traces` (or any descriptive name)
56+
- **Destination Type**: Select **Traces**
57+
- **OTLP Endpoint**: `https://api.honeycomb.io/v1/traces`
58+
- **Custom Headers**: Add the authentication header:
59+
- Header name: `x-honeycomb-team`
60+
- Header value: Your Honeycomb API key (e.g., `hcaik_01hq...`)
61+
4. Click **Save**
62+
63+
### Configure logs destination
64+
65+
Repeat the process for logs:
66+
67+
1. Click **Add destination** again
68+
2. Configure your logs destination:
69+
- **Destination Name**: `honeycomb-logs` (or any descriptive name)
70+
- **Destination Type**: Select **Logs**
71+
- **OTLP Endpoint**: `https://api.honeycomb.io/v1/logs`
72+
- **Custom Headers**: Add the authentication header:
73+
- Header name: `x-honeycomb-team`
74+
- Header value: Your Honeycomb API key (same as above)
75+
3. Click **Save**
76+
77+
## Step 3: Configure your Worker
78+
79+
With your destinations created in the Cloudflare dashboard, update your Worker's configuration to enable telemetry export.
80+
81+
<WranglerConfig>
82+
83+
```json
84+
{
85+
"observability": {
86+
"traces": {
87+
"enabled": true,
88+
// Must match the destination name in the dashboard
89+
"destinations": ["honeycomb-traces"]
90+
},
91+
"logs": {
92+
"enabled": true,
93+
// Must match the destination name in the dashboard
94+
"destinations": ["honeycomb-logs"]
95+
}
96+
}
97+
}
98+
```
99+
100+
</WranglerConfig>
101+
102+
After updating your configuration, deploy your Worker for the changes to take effect.
103+
104+
:::note
105+
It may take a few minutes after deployment for data to appear in Honeycomb.
106+
:::

src/content/docs/workers/observability/traces/known-limitations.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ While automatic instrumentation covers the platform interactions, we know you ne
2323
### Span and attribute names subject to change
2424
As Workers tracing is currently in beta, span names and attribute names are not yet finalized. We may refine these names during the beta period to improve clarity and align with OpenTelemetry semantic conventions. We recommend reviewing the [spans and attributes documentation](/workers/observability/traces/spans-and-attributes) periodically for updates.
2525

26-
###
26+
### Call outs
27+
*

0 commit comments

Comments
 (0)