Skip to content

Add the Vercel Observability events endpoint (vercel logs) to the Vercel preset - #2353

Draft
anzemur wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
anzemur:vercel-observability-events
Draft

anzemur wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
anzemur:vercel-observability-events

Conversation

@anzemur

@anzemur anzemur commented Oct 23, 2026

Copy link
Copy Markdown

Summary

The Vercel preset now adds POST /v1/observability/events as a spec override, registered as logs.queryObservabilityEvents. It's the endpoint behind vercel logs, and it searches runtime logs (vercel.log) or CDN request records (vercel.proxy_response) over a past time range, with a KQL-style filter and cursor paging.

Vercel's published spec leaves it out. The only runtime-log operation the spec does have, getRuntimeLogs, follows a live stream, so past logs can't be reached through the Vercel integration today. The override uses the same specOverrides mechanism as the Figma preset. The request and response shapes are taken from the Vercel CLI's own client (v65.2.0).

Notes:

  • It's a POST, so the existing method-based rule (annotationsForOperation) means it asks for approval like any other POST, even though it only reads.
  • Preset overrides apply when a Vercel integration is added. An integration that's already installed only picks this up when it's re-added, or when the override is pasted into its spec overrides.

Linked issue

Fixes #2351

Verification

  • vitest run src/sdk/presets.test.ts src/sdk/real-specs.test.ts src/sdk/spec-overrides.test.ts src/sdk/spec-overrides-lifecycle.test.ts: all passed. The new tests apply the override to fixtures/vercel.json, check that queryObservabilityEvents extracts as POST /v1/observability/events with the teamId query and query-reason header parameters, a request body and an output schema, and check that the catalog preset carries the override.
  • Adding the fixture spec with these overrides through executor.openapi.addSpec registers logs.queryObservabilityEvents next to logs.getRuntimeLogs. Checked with a scratch test, not committed.
  • Full packages/plugins/openapi suite: 337 passed. The 2 failures are the "connection refused" cases in upstream-failures.test.ts, and they fail the same way on main in my environment.
  • oxfmt --check, oxlint --deny-warnings on the changed files, bun run lint:changelog-stubs, and tsgo --noEmit for the package: clean.
  • Not verified: a live call against api.vercel.com through Executor. The shape matches what vercel logs sends.

Checklist

  • Added a changeset (.changeset/vercel-observability-events.md).
  • Added or updated tests for the new behaviour.
  • No secrets, credentials, or private data in the diff.

Vercel's published OpenAPI spec omits POST /v1/observability/events, the
endpoint behind `vercel logs`, and its only runtime-log operation follows a
live stream. The preset now adds it as a spec override, so past runtime logs
and CDN request records are searchable.
@anzemur

anzemur commented Oct 23, 2026

Copy link
Copy Markdown
Author

The E2E (cloud 15of16) failure (first-party-oauth.test.ts: "the first-party Google app is not offered in listings") also fails on main at this branch's base, 4b9869f (run 39888435354, the same job and assertion). This change only touches the Vercel preset, so it looks unrelated.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Vercel API app: search past runtime logs (getRuntimeLogs only streams; /v1/observability/events missing)

1 participant