React framework

Next.js observability, live in minutes.

Server traces, database spans and exceptions for Next.js through one instrumentation file — standard OpenTelemetry, no proprietary agent.

Three steps

Standard OpenTelemetry, pointed at us.

No proprietary agent, no vendor SDK required on the server. If your service already exports OTLP, step two is the whole integration.

Private beta. The first-party SDK for this framework is in private beta and is not published to a public registry yet. Email [email protected] for access. Everything on this page that uses the OpenTelemetry SDKs works today.
  1. STEP 1
    Create a project

    Sign up, create a project, and copy its ingest token. Nothing to install on our side.

  2. STEP 2
    Point your exporter at us

    Set OTEL_EXPORTER_OTLP_ENDPOINT to https://ingest.tracepath.dev/api/otel and OTEL_EXPORTER_OTLP_HEADERS to "Authorization=Bearer <token>". If you already emit OpenTelemetry, that is the whole integration.

  3. STEP 3
    Or wire the SDK explicitly

    Prefer code over environment variables? Configure the OTLP exporters yourself, exactly as in the sample below. Standard OpenTelemetry packages only — nothing TracePath-specific.

Real code

A working instrumentation.ts.

Standard OpenTelemetry packages only — this is the actual shape of a Next.js integration against TracePath.

export async function register() {
  if (process.env.NEXT_RUNTIME === "nodejs") {
    const { NodeSDK } = await import("@opentelemetry/sdk-node");
    const { OTLPTraceExporter } = await import(
      "@opentelemetry/exporter-trace-otlp-http",
    );
    const { OTLPMetricExporter } = await import(
      "@opentelemetry/exporter-metrics-otlp-http",
    );
    const { PeriodicExportingMetricReader } = await import(
      "@opentelemetry/sdk-metrics",
    );
    const { getNodeAutoInstrumentations } = await import(
      "@opentelemetry/auto-instrumentations-node",
    );

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

    const sdk = new NodeSDK({
      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/nextjs-otel/instrumentation.ts in our examples.

What you get

Built for Next.js.

Server traces, database and outbound-HTTP spans via OpenTelemetry auto-instrumentation

Metrics exported on the same pipeline, no second exporter to configure

Unhandled server exceptions arrive as exception events with full trace context

Source-map symbolication for production minified stacks

Browser error boundary and session replay: first-party SDK in private beta

Other frameworks

Instrument Next.js today.

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