Remix - backend (server) performance monitoring and tracing with express #6965
-
Hi, we're running Remix with express. I want to make sure our performance monitoring and tracing is setup as extensively as possible with Sentry. The docs only seem to mention browser tracing for Remix. What about the server? Should we set it up as described for express? https://docs.sentry.io/platforms/node/guides/express/
Thanks! Alex |
Beta Was this translation helpful? Give feedback.
Answered by
AbhiPrasad
Jan 30, 2023
Replies: 1 comment 3 replies
-
Hey @alexblack, we need to update our performance docs to make backend configuration more clear. For now you can see these instructions in https://docs.sentry.io/platforms/javascript/guides/remix/. // entry.server.tsx
import { prisma } from "~/db.server";
import * as Sentry from "@sentry/remix";
Sentry.init({
dsn: "https://[email protected]/0",
tracesSampleRate: 1,
integrations: [new Sentry.Integrations.Prisma({ client: prisma })],
// ...
}); // server/index.ts
import { wrapExpressCreateRequestHandler } from "@sentry/remix";
import { createRequestHandler } from '@remix-run/express';
// ...
const createSentryRequestHandler = wrapExpressCreateRequestHandler(createRequestHandler);
// Use createSentryRequestHandler like you would with createRequestHandler
app.all('*', createSentryRequestHandler(/* ... */)); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
AbhiPrasad
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @alexblack, we need to update our performance docs to make backend configuration more clear. For now you can see these instructions in https://docs.sentry.io/platforms/javascript/guides/remix/.