feat(core): emit faas.instance span attribute for compute instance identity#2989
feat(core): emit faas.instance span attribute for compute instance identity#2989alangenfeld wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: d1b2338 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Workflow Benchmarkscommit Backend:
📜 Previous results (2)5e0e611Fri, 17 Jul 2026 19:14:49 GMT · run logs
ad3b139Fri, 17 Jul 2026 18:50:22 GMT · run logs
Avg deltas compare against the most recent benchmark run on Metrics — TTFS: time to first step body execution · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (time outside step bodies, client start → last step body exit) · SL: stream latency (first chunk write → visible to the reader) Scenarios — stream: one step that streams chunks back to the client; no hooks, so the run stays in turbo mode · hook + stream: registers a hook before the same streaming step, which exits turbo mode · 1020 steps: 1020 trivial sequential steps; STSO is measured between consecutive steps in the given step ranges 🟢/🔴 mark percentiles within/above target. Targets (p75/p90/p99, ms) — TTFS 200/300/600 · SL 50/60/125 · STSO (1-20) 20/30/60 · STSO (101-120) 30/45/90 · STSO (1001-1020) 40/60/120 TTFS/WO compare client vs deployment clocks and SL compares the step runner’s clock vs the client’s (NTP-synced in CI). WO ends at the last step body exit, the closest observable proxy for the final step-completion request. |
🧪 E2E Test Results✅ All tests passed Summary
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
✅ vercel-multi-region
|
ad3b139 to
5e0e611
Compare
…entity Synthesize a per-warm-instance id (cinst_<ulid>) once at module load and emit it as the OTEL faas.instance attribute on the flow and step route spans. Vercel exposes no native per-instance id under Fluid compute, so this lets traces distinguish which compute instance handled each request. Purely additive telemetry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Alex Langenfeld <alex.langenfeld@vercel.com>
5e0e611 to
d1b2338
Compare
What
Synthesize a per-instance id (
cinst_<ulid>, minted once at module load) and emit it as the OpenTelemetryfaas.instancespan attribute on the flow and step route spans.Why
Vercel exposes no native per-instance id under Fluid compute (all
AWS_LAMBDA_*env vars are blocked), yet Fluid packs concurrent invocations onto one instance. This attribute tells traces which instance handled each request — the basis for observability that distinguishes steps sharing an instance from those that don't.Scope / risk
Purely additive: a new span attribute behind the existing
span?.setAttributes. No wire-format, schema, or behavior change; no cross-repo dependency; usable now via any OTEL backend.First of a short series — later PRs persist the same id on
step_startedevents to drive the observability UI.🤖 Generated with Claude Code