Node framework

Express observability, live in minutes.

Traces and metrics for Express in one bootstrap file, no middleware zoo required.

Three ways in

Snippet, wizard, or manual.

Lead with the fastest path — the copy-paste snippet with your token baked in. The wizard and manual setup stay available.

  1. STEP 1
    Copy-paste the snippet

    Create an OpenTelemetry project and export TRACEPATH_URL + TRACEPATH_TOKEN.

  2. STEP 2
    Run the wizard

    npx tracepath-wizard detects Express and installs the OTel packages.

  3. STEP 3
    Manual path

    Install @opentelemetry/sdk-node and require the bootstrap before your server.

Real code

A working instrumentation.js.

Taken from our own examples and docs — this is the actual shape of a Express integration.

import { NodeSDK } from "@opentelemetry/sdk-node";
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http";
import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";

const tracepathUrl = process.env.TRACEPATH_URL || "https://ingest.tracepath.dev";
const tracepathToken = process.env.TRACEPATH_TOKEN;

const sdk = new NodeSDK({
  serviceName: "my-express-app",
  traceExporter: new OTLPTraceExporter({
    url: `${tracepathUrl}/api/otel/v1/traces`,
    headers: { Authorization: `Bearer ${tracepathToken}` },
  }),
  metricReader: new PeriodicExportingMetricReader({
    exporter: new OTLPMetricExporter({
      url: `${tracepathUrl}/api/otel/v1/metrics`,
      headers: { Authorization: `Bearer ${tracepathToken}` },
    }),
    exportIntervalMillis: 10_000,
  }),
  instrumentations: [getNodeAutoInstrumentations()],
});

sdk.start();

Source: examples/express-otel/instrumentation.js in the TracePath repo. TODO-verify: snippet matches the latest SDK release before publishing.

What you get

Built for Express.

HTTP request spans with route templating

Outbound fetch/http instrumentation

Metrics exported every 10s

Errors become exception events with trace context

Browse everything tagged #express

Other frameworks

Instrument Express today.

Free plan, no credit card. First event in under five minutes.