Daemons can now send traces to Vercel Tracing
Vercel Daemons can now send OpenTelemetry traces to Vercel Tracing, so spans from your background workers show up next to the rest of your project's traces.
Each daemon gets a Unix socket that accepts OTLP/HTTP traces, and Vercel puts its path in VERCEL_OTEL_SOCKET_PATH. For Node.js daemons on the default configuration, upgrade @vercel/otel to 2.3.0 or later and call registerOTel({ serviceName: 'my-daemon' }) at the top of the worker's entry file. The SDK finds the socket and exports the spans your worker records, with no endpoint to configure. Other languages can point any OpenTelemetry exporter that supports Unix sockets at the same path. The socket takes protobuf or JSON bodies, and OTLP/gRPC isn't supported.
The spans are also available from the Vercel CLI. Something like vercel traces search --project my-project --service my-daemon --json searches by service name and returns JSON, which you can hand to an agent.
If you set an OTLP endpoint yourself, or pass a custom traceExporter, the socket isn't used. Tracing during the beta has limits, including 192 KiB per span, and the spans count toward your tracing usage.