initialize() failed; the app will run untraced error in the logs and no spans. Add the following to any API route that makes LLM calls:
Flush before the function returns
Vercel functions can freeze or exit as soon as the response is sent, before the batching span processor exports. Spans then appear locally but never in production.await flush() at the end of every handler that makes LLM calls:
Keep the SDKs external
In Next.js, list your LLM SDKs andbelvedir itself in serverExternalPackages so every bundle shares one runtime copy; a route that bundles its own copy calls flush() on an uninitialized duplicate and spans drop silently on serverless. See the Next.js guide for the version-specific config key.
Set BELVEDIR_API_KEY in your Vercel project’s environment variables, then redeploy. See Environment Variables for the full list.