Tanstack Start deployed to Vercel integration #18356
-
|
Hey I'm not getting any server logs in my Tanstack Start deployed to Vercel. I've tried following the tutorial and setting NODE_OPTIONS but then then i found in other framework docs that Vercel doesn't support NODE_OPTIONS so I needed to import the instrument file directly in the server entry point:
import 'instrument.server.mjs'
import handler, { createServerEntry } from '@tanstack/react-start/server-entry'
export default createServerEntry({
fetch(request) {
return handler.fetch(request)
},
})Despite this I'm still not getting any logs from my server functions. I think we need to update the docs as well for this. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Hey @nandcello, how exactly do you try to obtain logs (e.g. Sentry.logger in a server function)? Also it might be helpful if you could provide the contents of your Note that we do not yet have any instrumentation for the server-side of Tanstack Start. So the likely answer is that we do not support your use case yet. We will work on improving this over the coming months. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @nicohrubec; for the instrument.server.mjs, I put just the default that's in the docs: // instrument.server.mjs
import * as Sentry from "@sentry/tanstackstart-react";
Sentry.init({
dsn: "https://1234.ingest.us.sentry.io/1234",
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#sendDefaultPii
sendDefaultPii: true,
});As a Tanstack Start solution partner for observability I would have expected at least error reporting to work pretty well on server side as well. |
Beta Was this translation helpful? Give feedback.
Thanks for providing the instrumentation file. You are definitely missing
enableLogs: truein your init to enable the logs feature. For more information you can have a look at the logs setup page.Our Tanstack Start SDK is in alpha and still very much a work in progress. We are working closely with Tanstack maintainers to improve support. Server-side error monitoring is of course very high on our priority list. You can check out the Tanstack Start SDK tracking issue to follow progress.