Technology1 min read

Daemons can now send traces to Vercel Tracing

By · Published by Everything Blog

In short

Vercel Daemons now forward OpenTelemetry traces directly into the Vercel Tracing infrastructure via a local Unix socket. Node.js environments can automate this collection by updating their core telemetry package, provided OpenTelemetry is initialized before starting the worker. Once recorded, developers can query their collected telemetry spans through the platform's command-line interface. The CLI allows users to search spans from the past hour by project and service name in standard JSON format.

Key points

  • Background daemon traces can now be evaluated seamlessly alongside general project teleme…: Background daemon traces can now be evaluated seamlessly alongside general project telemetry data.
  • The standard software development kit automatically detects the local socket to simplify…: The standard software development kit automatically detects the local socket to simplify trace collection.
  • Developers can retrieve and inspect JSON-formatted daemon spans from the past hour via th…: Developers can retrieve and inspect JSON-formatted daemon spans from the past hour via the Vercel CLI.

Sources checked by our analysis pipeline: 1

Vercel Daemons can now send OpenTelemetry traces to Vercel Tracing, allowing you and your agents to inspect background worker operations alongside the rest of your project's traces.

Vercel provides each daemon with a Unix socket for receiving OTLP/HTTP traces and sets the socket's path in VERCEL_OTEL_SOCKET_PATH

.

Upgrading @vercel/otel to version 2.3.0 or later enables automatic trace export for Node.js daemons using the default configuration. The SDK detects this socket and sends the spans your worker records to Vercel.

import { registerOTel } from '@vercel/otel';

registerOTel({ serviceName: 'my-daemon' });

Initialize OpenTelemetry before the worker starts.

These spans are available through the Vercel CLI, which can search by service name within a project and return JSON for your agents.

vercel traces search --project my-project --service my-daemon --json

Search daemon spans from the last hour as JSON.

Learn more in the daemon tracing documentation.

Technology