npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

autolemetry-backends

v2.0.1

Published

Vendor backend configurations for Autolemetry (Honeycomb, Datadog, etc.)

Readme

Autolemetry Backends

Vendor backend configurations for Autolemetry - simplified setup helpers for popular observability platforms.

What are Backends?

Backends are vendor-specific configuration helpers that simplify setting up Autolemetry with observability platforms like Honeycomb, Datadog, New Relic, etc.

They handle:

  • Correct endpoint URLs for each vendor
  • Authentication headers and API key formats
  • Protocol selection (gRPC vs HTTP)
  • Region-specific configurations
  • Best practice defaults

Backends vs Plugins

| Package | Purpose | Examples | | ------------------------ | ----------------------------------------------------- | --------------------------- | | autolemetry-backends | Configure where telemetry goes (outputs) | Honeycomb, Datadog, Grafana | | autolemetry-plugins | Instrument libraries to create telemetry (inputs) | Drizzle ORM, custom SDKs |

Think of it this way: Plugins create the data, backends send it somewhere.

Installation

npm install autolemetry autolemetry-backends

Quick Start

Honeycomb

import { init } from 'autolemetry';
import { createHoneycombConfig } from 'autolemetry-backends/honeycomb';

init(
  createHoneycombConfig({
    apiKey: process.env.HONEYCOMB_API_KEY!,
    service: 'my-app',
  }),
);

Datadog

import { init } from 'autolemetry';
import { createDatadogConfig } from 'autolemetry-backends/datadog';

// Direct cloud ingestion (serverless, edge)
init(
  createDatadogConfig({
    apiKey: process.env.DATADOG_API_KEY!,
    service: 'my-lambda',
  }),
);

// Or use local Datadog Agent (Kubernetes, long-running services)
init(
  createDatadogConfig({
    service: 'my-api',
    useAgent: true,
  }),
);

Available Backends

🍯 Honeycomb

Honeycomb provides powerful distributed tracing and observability.

import { createHoneycombConfig } from 'autolemetry-backends/honeycomb';

init(
  createHoneycombConfig({
    apiKey: process.env.HONEYCOMB_API_KEY!,
    service: 'my-app',
    environment: 'production',
    version: '1.0.0',
    dataset: 'my-dataset', // Optional: for classic accounts
  }),
);

Features:

  • Auto-configures gRPC protocol (Honeycomb's preferred)
  • Supports both classic datasets and modern service-based routing
  • Environment and version tagging
  • Head-based sampling configuration

View full Honeycomb configuration options →

🐕 Datadog

Datadog provides comprehensive APM, infrastructure monitoring, and logs.

import { createDatadogConfig } from 'autolemetry-backends/datadog';

// Cloud ingestion (best for serverless/edge)
init(
  createDatadogConfig({
    apiKey: process.env.DATADOG_API_KEY!,
    site: 'datadoghq.com', // or 'datadoghq.eu', 'us3.datadoghq.com', etc.
    service: 'my-lambda',
    environment: 'production',
    enableLogs: true, // Optional: also send logs
  }),
);

// Agent-based (best for Kubernetes/VMs)
init(
  createDatadogConfig({
    service: 'my-api',
    useAgent: true,
    agentHost: 'localhost', // or 'datadog-agent.default.svc.cluster.local'
    agentPort: 4318,
  }),
);

Features:

  • Direct cloud ingestion OR local agent
  • Multi-region support (US1, US3, US5, EU, AP1, FedRAMP)
  • Unified service tagging (service, env, version)
  • Optional log export via OTLP
  • Kubernetes-friendly agent configuration

View full Datadog configuration options →

Why Use Backend Configs?

Without backend configs (manual):

import { init } from 'autolemetry';

init({
  service: 'my-app',
  endpoint: 'https://api.honeycomb.io:443',
  protocol: 'grpc',
  otlpHeaders: {
    'x-honeycomb-team': process.env.HONEYCOMB_API_KEY!,
    'x-honeycomb-dataset': 'production',
  },
  environment: 'production',
  version: '1.0.0',
});

With backend configs:

import { init } from 'autolemetry';
import { createHoneycombConfig } from 'autolemetry-backends/honeycomb';

init(
  createHoneycombConfig({
    apiKey: process.env.HONEYCOMB_API_KEY!,
    service: 'my-app',
    environment: 'production',
    version: '1.0.0',
  }),
);

Benefits:

  • Less code, fewer mistakes
  • Vendor best practices built-in
  • Validated configurations
  • Easy to switch vendors

Using Environment Variables

All backends work great with environment variables:

import { createHoneycombConfig } from 'autolemetry-backends/honeycomb';

init(
  createHoneycombConfig({
    apiKey: process.env.HONEYCOMB_API_KEY!,
    service: process.env.SERVICE_NAME || 'my-app',
    environment: process.env.NODE_ENV,
  }),
);

Or use Autolemetry's built-in env var support:

# .env
OTEL_SERVICE_NAME=my-app
OTEL_EXPORTER_OTLP_ENDPOINT=https://api.honeycomb.io
OTEL_EXPORTER_OTLP_HEADERS=x-honeycomb-team=YOUR_API_KEY
import { init } from 'autolemetry';

// Reads from env vars automatically
init({});

Migration from autolemetry/presets

If you were using autolemetry/presets/*, migration is simple:

Before (v1.x):

import { createHoneycombConfig } from 'autolemetry/presets/honeycomb';

After (v2.x):

npm install autolemetry-backends
import { createHoneycombConfig } from 'autolemetry-backends/honeycomb';

The configuration options are identical - only the import path changed.

Philosophy

Autolemetry follows the principle: "Write once, observe everywhere".

Backend configurations are:

  • Optional: Use raw init() config if you prefer
  • Vendor-agnostic at core: Keeping these separate maintains the vendor-neutral philosophy
  • Best practices: Configurations follow vendor recommendations
  • Tree-shakeable: Import only what you need

TypeScript

Full type safety with TypeScript:

import type {
  HoneycombPresetConfig,
  DatadogPresetConfig,
} from 'autolemetry-backends';

const honeycombConfig: HoneycombPresetConfig = {
  apiKey: process.env.HONEYCOMB_API_KEY!,
  service: 'my-app',
};

const datadogConfig: DatadogPresetConfig = {
  apiKey: process.env.DATADOG_API_KEY!,
  service: 'my-app',
  site: 'datadoghq.com',
};

Contributing

Want to add a new backend configuration? Please open an issue to discuss.

Popular backends we'd love to support:

  • Grafana Cloud
  • New Relic
  • Lightstep
  • Elastic APM
  • AWS X-Ray
  • Google Cloud Trace

License

MIT