Skip to main content
Observe

OpenTelemetry

Instrument functions so application spans appear in Easel request Traces.

Easel collects OpenTelemetry spans emitted from your function runtime and nests them under the platform Invoke function span in the request Trace.

Use OpenTelemetry to see database queries, outbound fetches, and application operations next to edge routing and invoke timing.

How collection works

On supported Node.js runtimes, Easel provides a request context compatible with @vercel/otel and telemetry.reportSpans. Spans buffered during the invoke are flushed into the observability pipeline and attached to the request Trace.

You do not configure a separate OTLP endpoint for Easel collection. Instrument your app; Easel ingests the spans with the request.

Span capture is bounded (count and byte limits). Excess spans may be truncated.

Next.js

Create instrumentation.ts in the project root or src directory:

export async function register() {
  if (process.env.NEXT_RUNTIME === "nodejs") {
    await import("./instrumentation.node");
  }
}

In instrumentation.node.ts, initialize @vercel/otel or a standard OpenTelemetry Node SDK and instrumentation packages for the libraries you use.

See the Next.js framework guide.

Other Node.js frameworks

For React Router, TanStack Start, and other Node.js server runtimes on Easel Functions:

  1. Install OpenTelemetry SDK and instrumentation packages.
  2. Register instrumentation at process startup for the server entry.
  3. Instrument server routes, loaders, database clients, and outbound HTTP.
  4. Deploy and open Logs → Trace for a request that hit the instrumented path.

Framework-specific notes live in each framework guide.

What you will see

After instrumentation:

  1. Open Logs and select a request.
  2. Open the Trace tab.
  3. Expand Invoke function.
  4. Inspect Framework, Fetch, and Custom spans from your application.

If instrumentation is missing, platform spans still appear (Resolve Deployment, Resolve Route, Invoke middleware, Invoke function).

Limits

  • Collection is for Easel Traces, not a general-purpose customer OTLP sink.
  • Spans are associated with the active request and invocation when available.
  • Late async work should finish within waitUntil bounds so spans can flush before the isolate parks. See Function runtime.