⚡ Signal Lab

Trigger real API calls, generate traces, emit logs, and produce errors — all wired to Datadog APM, RUM, and Logs via the Vercel log drain.

Health Check

Ready

GET /api/lab/health — basic liveness check with trace.

Env Info

Ready

GET /api/lab/env-info — safe Vercel env snapshot.

CMS Fetch

Ready

GET /api/lab/cms-fetch — fetch latest posts from Sanity.

Slow Query

Ready

Artificial delay to trigger latency traces.

Chain (3 hops)

Ready

Chained fetch through /api/lab/health × 3.

Lead Capture

Ready

POST /api/lab/lead-capture — validates and logs a form submission.

Outbound Proxy

Ready

POST /api/lab/proxy — fetch an external URL through the server.

Quick:

Log Burst

Ready

POST /api/lab/log-burst — emit N structured log lines.

Custom Attribute

Ready

POST /api/lab/custom-attribute — set a span attribute.

Direct OTLP Test

Ready

GET /api/lab/otel-direct — sends a trace, log, and metric directly to Datadog's OTLP intake (and the Vercel sidecar if available). On Vercel uses vercel.integrations.otlp.* endpoint; locally falls back to otlp.* with dd-otlp-source.

Direct OTLP Log

Ready

POST /api/lab/otlp-logs — send a log directly to Datadog's OTLP logs endpoint, bypassing the Vercel drain. Requires DATADOG_API_KEY.

Runtime Metrics Snapshot

Ready

GET /api/lab/runtime-metrics — snapshots heap, RSS, CPU, and uptime, then emits them as OTel gauges. Works alongside background RuntimeNodeInstrumentation metrics.

Lambda Runtime Probe

Ready

GET /api/lab/lambda-context — reads AWS_LAMBDA_METADATA_API to surface function ARN, X-Ray trace ID, and invocation metadata via the Extensions and Runtime APIs.

Environment Inspector

Ready

POST /api/lab/debug-env — requires DEBUG_SECRET passcode. Sensitive keys are redacted.

Handled errors are caught and returned as 500 JSON. Unhandled errors throw and let Next.js produce the 500 — both set OTel span attributes for Datadog Error Tracking.

Handled

Generic Error

Ready

GET /api/lab/handled-error — basic Error class, caught and logged.

TypeError — Null Access

Ready

GET /api/lab/error/type-error — accesses a property on null.

SyntaxError — Bad JSON

Ready

GET /api/lab/error/syntax-error — JSON.parse on a malformed string.

Custom Error Class

Ready

GET /api/lab/error/custom-error — DatabaseConnectionError with code + host attributes.

RangeError — Stack Overflow

Ready

GET /api/lab/error/range-error — infinite recursion, tests truncated stack capture.

Async Error with Cause

Ready

GET /api/lab/error/async-error — async rejection wrapped with error cause chain.

Unhandled

Generic Unhandled

Ready

GET /api/lab/unhandled-error — throws a plain Error, no catch.

Unhandled TypeError

Ready

GET /api/lab/error/unhandled-type-error — throws a TypeError, tests grouping by error.type.

Unhandled Custom Error

Ready

GET /api/lab/error/unhandled-custom-error — throws UpstreamServiceError with upstream.service + status_code attributes.