Repository navigation
Conversation
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.
Author
|
The |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Vercel preset now adds
POST /v1/observability/eventsas a spec override, registered aslogs.queryObservabilityEvents. It's the endpoint behindvercel 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 samespecOverridesmechanism as the Figma preset. The request and response shapes are taken from the Vercel CLI's own client (v65.2.0).Notes:
annotationsForOperation) means it asks for approval like any other POST, even though it only reads.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 tofixtures/vercel.json, check thatqueryObservabilityEventsextracts asPOST /v1/observability/eventswith theteamIdquery and query-reason header parameters, a request body and an output schema, and check that the catalog preset carries the override.executor.openapi.addSpecregisterslogs.queryObservabilityEventsnext tologs.getRuntimeLogs. Checked with a scratch test, not committed.packages/plugins/openapisuite: 337 passed. The 2 failures are the "connection refused" cases inupstream-failures.test.ts, and they fail the same way onmainin my environment.oxfmt --check,oxlint --deny-warningson the changed files,bun run lint:changelog-stubs, andtsgo --noEmitfor the package: clean.api.vercel.comthrough Executor. The shape matches whatvercel logssends.Checklist
.changeset/vercel-observability-events.md).