Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide provides instructions for integrating Axiom with the TrueFoundry AI Gateway to export OpenTelemetry traces and metrics.

What is Axiom?

Axiom is a serverless observability and log analytics platform built for timestamped event data at scale. It accepts logs, traces, and metrics through standard OTLP endpoints and stores them in its proprietary EventDB architecture, enabling sub-second query latency on petabyte-scale datasets. Teams query and visualize this data using Axiom Processing Language (APL) or the point-and-click query builder in the Axiom Console.

Key Features of Axiom

  • OpenTelemetry Native Ingestion: Accepts traces, logs, and metrics over OTLP/HTTP with API token authentication and dataset routing via request headers.
  • Axiom Processing Language (APL): A powerful query language for filtering, aggregating, and summarizing event data across logs and traces in a unified interface.
  • Datasets: Namespaced containers for event data. Each OTel signal (traces, metrics, logs) is routed to a dedicated dataset via the X-Axiom-Dataset header.
  • Dashboards and Alerts: Build visualizations and threshold-based alerts directly on top of ingested trace and metric data.

Prerequisites

Before integrating Axiom with TrueFoundry, ensure you have:
  1. TrueFoundry Account: Create a TrueFoundry account and follow the instructions in our Gateway Quick Start Guide.
  2. Axiom Account: Sign up at app.axiom.co. A free tier is available with 0.5 TB of storage.
  3. Axiom Dataset: Create at least one dataset in Axiom for traces. When creating the dataset select Events as the type (not Metrics). Optionally create a second dataset for metrics.
  4. Axiom API Token: Create an API token with Ingest permission scoped to your dataset.

Understanding the Axiom Endpoint

Axiom uses a single fixed base URL for all OTLP ingestion: https://api.axiom.co. The signal path is appended to this base:
  • Traces: https://api.axiom.co/v1/traces
  • Metrics: https://api.axiom.co/v1/metrics
  • Logs: https://api.axiom.co/v1/logs
Dataset routing is controlled by the X-Axiom-Dataset header on every request — not by the URL. This means traces and metrics can go to different datasets by using different header values in each exporter config.

Integration Steps

1

Create a Dataset and API Token in Axiom

  1. Log in to app.axiom.co.
  2. In the left sidebar click Datasets then click New Dataset.
  3. Name the dataset (for example tfy-gateway-traces), select Events as the type, and click Create.
  4. If you also want to export metrics, create a second dataset (for example tfy-gateway-metrics) and select Metrics as the type.
  5. Go to SettingsAPI Tokens and click New API Token.
  6. Give the token a name (for example tfy-gateway), select Ingest as the permission, and scope it to the dataset(s) you just created.
  7. Click Create and copy the token immediately — Axiom will not show it again.
Axiom Settings page showing API Tokens tab with a token created for TrueFoundry ingestion
API tokens in Axiom start with xaat-. If your token does not start with this prefix it may be a personal token, which also works but is not recommended for production use.
2

Configure OTEL Export in TrueFoundry

  1. Go to AI GatewayControlsSettings in the TrueFoundry dashboard.
  2. Scroll down to the OTEL Config section and click the edit (✏️) button.
TrueFoundry AI Gateway Settings page showing the OTEL Config section
  1. Enable the Otel Traces Exporter Configuration toggle and fill in:
FieldValue
ToggleEnabled
ProtocolHTTP Configuration
Endpointhttps://api.axiom.co/v1/traces
EncodingProto
Header Key 1Authorization
Header Value 1Bearer <your-axiom-api-token>
Header Key 2X-Axiom-Dataset
Header Value 2tfy-gateway-traces (or your dataset name)
TrueFoundry OTEL Traces Exporter Configuration showing Axiom endpoint and headers
  1. Enable the Otel Metrics Exporter Configuration toggle and fill in:
FieldValue
ToggleEnabled
ProtocolHTTP Configuration
Endpointhttps://api.axiom.co/v1/metrics
EncodingProto
Header Key 1Authorization
Header Value 1Bearer <your-axiom-api-token>
Header Key 2X-Axiom-Dataset
Header Value 2tfy-gateway-metrics (or your metrics dataset name)
  1. Click Save to apply the configuration.
Axiom requires two headers for every exporter: the Authorization header with your Bearer token and the X-Axiom-Dataset header with the target dataset name. If the X-Axiom-Dataset header is missing, Axiom will reject the request. Traces and metrics can be routed to different datasets by using different dataset names in each exporter’s config.
3

Verify the Integration

  1. Make a request through the TrueFoundry AI Gateway (for example from the Playground).
  2. Log into app.axiom.co and click Stream in the top navigation.
  3. Select your traces dataset (tfy-gateway-traces) from the dataset selector.
  4. Click Run — you should see spans from tfy-llm-gateway appearing with attributes like service.name, tfy.input, tfy.output, and standard gen_ai.* fields.
Axiom Stream view showing LLM call traces from TrueFoundry AI Gateway with gen_ai attributes
  1. To verify metrics, switch the dataset selector to your metrics dataset (tfy-gateway-metrics) and click Run. Metrics appear in the same Stream view — no separate metrics dashboard is needed.
If no data appears after a minute, check that the TrueFoundry gateway pod was restarted after saving the OTEL config. OTEL exporter settings take effect only after the gateway pod restarts.

Configuration Reference

ConfigurationValue
Traces Endpointhttps://api.axiom.co/v1/traces
Metrics Endpointhttps://api.axiom.co/v1/metrics
ProtocolHTTP
EncodingProto
Auth Header KeyAuthorization
Auth Header ValueBearer <your-axiom-api-token>
Dataset Header KeyX-Axiom-Dataset
Dataset Header ValueYour Axiom dataset name