Backends
autotel-backends provides vendor-specific configuration helpers that simplify init() for popular observability platforms.
If you want to send telemetry to more than one OTLP backend at once, use Autotel’s destinations config in addition to these helpers. Keep endpoint for one destination; use destinations for explicit fan-out.
Installation
Section titled “Installation”npm install autotel autotel-backendsHoneycomb
Section titled “Honeycomb”import { init } from 'autotel';import { createHoneycombConfig } from 'autotel-backends/honeycomb';
init( createHoneycombConfig({ apiKey: process.env.HONEYCOMB_API_KEY!, service: 'my-app', }),);Datadog
Section titled “Datadog”For the full Datadog integration guide – including architecture choices, Agent vs. direct ingestion setup, migration from pino-datadog-transport, deployment patterns, troubleshooting, and advanced configuration – see the dedicated Datadog Integration page.
import { init } from 'autotel';import { createDatadogConfig } from 'autotel-backends/datadog';
// Direct cloud ingestion (serverless, edge)init( createDatadogConfig({ apiKey: process.env.DATADOG_API_KEY!, service: 'my-lambda', }),);
// Or local Datadog Agent (Kubernetes, long-running services)init( createDatadogConfig({ service: 'my-api', useAgent: true, }),);Logfire
Section titled “Logfire”Logfire requires regional OTLP/HTTP protobuf ingestion. Its write token is not
the read token used by autotel investigate --backend logfire.
import { init } from 'autotel';import { createLogfireConfig } from 'autotel-backends/logfire';
init( createLogfireConfig({ writeToken: process.env.LOGFIRE_WRITE_TOKEN!, service: 'my-agent', region: 'eu', // required: 'eu' | 'us' }),);The preset selects http/protobuf, the regional ingest endpoint, and Logfire’s
bare-token Authorization format. Use endpoint only for self-hosted Logfire.
Langfuse
Section titled “Langfuse”[!TIP] This preset covers the connection. For the fields Langfuse keeps in its own columns (trace name, tags, prompt links, time to first token) and for evaluation results as scores, see Langfuse.
import { init } from 'autotel';import { createLangfuseConfig } from 'autotel-backends/langfuse';
init( createLangfuseConfig({ publicKey: process.env.LANGFUSE_PUBLIC_KEY!, secretKey: process.env.LANGFUSE_SECRET_KEY!, service: 'my-agent', region: 'eu', // 'eu' (default) | 'us' }),);The preset builds Basic authentication, uses Langfuse’s
/api/public/otel receiver, and opts into ingestion v4. Set baseUrl for a
self-hosted instance.
PostHog
Section titled “PostHog”import { init } from 'autotel';import { createPostHogConfig } from 'autotel-backends/posthog';
init( createPostHogConfig({ projectToken: process.env.POSTHOG_PROJECT_TOKEN!, service: 'my-app', region: 'eu', // 'us' (default) | 'eu' }),);The preset sends traces, logs, and metrics as OTLP/HTTP protobuf, preserves
PostHog’s /i path prefix, and uses Bearer authentication. This is OTLP ingest.
The session and replay join lives on the PostHog
page.
Available Backends
Section titled “Available Backends”| Backend | Import | Transport selected |
|---|---|---|
| Honeycomb | autotel-backends/honeycomb |
gRPC |
| Datadog | autotel-backends/datadog |
Vendor/mode-specific |
| Google Cloud | autotel-backends/google-cloud |
Vendor-specific |
| Grafana | autotel-backends/grafana |
OTLP/HTTP |
| Logfire | autotel-backends/logfire |
OTLP/HTTP protobuf |
| Langfuse | autotel-backends/langfuse |
OTLP/HTTP JSON |
| PostHog | autotel-backends/posthog |
OTLP/HTTP protobuf |
Multi-backend fan-out
Section titled “Multi-backend fan-out”Use destinations when you want one app to ship to multiple OTLP backends without manually constructing exporters:
import { init } from 'autotel';
init({ service: 'my-app', logs: true, destinations: [ { endpoint: 'https://otlp-gateway-prod.grafana.net/otlp', headers: 'Authorization=Basic ...', }, { endpoint: 'https://api.honeycomb.io', headers: { 'x-honeycomb-team': process.env.HONEYCOMB_API_KEY! }, signals: ['traces'], }, ],});Use the backend helpers when you want vendor-specific defaults for one destination. Use destinations when you want one service to fan out to several OTLP backends.
Examples
Section titled “Examples”example-datadog: Datadog withcreateDatadogConfig(), direct cloud ingestion and local agent modes.example-grafana: Grafana Cloud (Tempo + Mimir + Loki) via OTLP with canonical log lines.
Backends vs Plugins
Section titled “Backends vs Plugins”| Package | Purpose |
|---|---|
autotel-backends |
Configure where telemetry goes (outputs) |
autotel-plugins |
Instrument libraries to create telemetry (inputs) |