cold-start: tune Sentry sampling and Vercel function limits#45
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR reduces Vercel cold-start overhead by disabling SvelteKit's experimental OpenTelemetry server tracing on Vercel (while keeping Sentry initialisation intact), lowering Sentry's production trace sample rate from 100 % to 10 %, and adding
Confidence Score: 5/5Safe to merge — the changes are narrowly scoped to Vercel configuration and do not touch any application logic. SvelteKit's OpenTelemetry tracing is disabled only on Vercel builds, while instrumentation.server remains true, keeping Sentry initialised and error reporting fully operational. The trace sample-rate change is a build-time constant swap with no runtime risk. All maxDuration exports use the correct adapter-level API, which is the authoritative path for the Build Output API. No application logic was changed. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Vercel Cold Start] --> B{VERCEL eq 1?}
B -- Yes --> C[tracing.server = false\nSvelteKit OTEL disabled]
B -- No --> D[tracing.server = true\nSvelteKit OTEL enabled]
C --> E[instrumentation.server = true\nSentry.init called]
D --> E
E --> F{PROD build?}
F -- Yes --> G[tracesSampleRate = 0.1]
F -- No --> H[tracesSampleRate = 1.0]
G --> I[Sentry errors and logs captured]
H --> I
subgraph Route maxDuration
J[agent-runs: 300s]
K[runs stream: 300s]
L[github webhook: 60s]
M[regression routes: 300s]
end
Reviews (6): Last reviewed commit: "address greptile review feedback (greplo..." | Re-trigger Greptile |
|
@greptile review |
|
@greptile review |
Lowers Sentry trace sampling in production, disables server tracing on Vercel, and sets maxDuration for long-running agent and webhook routes.
Keep Sentry instrumentation enabled on Vercel while disabling only server tracing, move maxDuration to adapter-level config on regression routes, and remove redundant vercel.json function entries. Co-authored-by: Cursor <cursoragent@cursor.com>
Re-enable Sentry server instrumentation while keeping Vercel-only tracing disabled. Co-authored-by: Cursor <cursoragent@cursor.com>
9c30bd4 to
f1f144f
Compare

Stack Context
This stack reduces Vercel cold-start time by shrinking the shared SvelteKit server boot path and isolating heavy agent/GitHub dependencies.
Why?
Full Sentry trace sampling and server instrumentation added startup overhead on every cold boot. This PR lowers production sampling, disables Sentry server tracing on Vercel, and sets
maxDurationon long-running agent and webhook routes.Test plan