-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing postgres query spans in Remix app #14238
Comments
hey @finack, thanks for the detailed reproduction. Might be just an oversight in the repo but did you actually call the integration? // in the reproduction repo you do this: integrations: [Sentry.postgresIntegration],
// instead you should do:
integrations: [Sentry.postgresIntegration()], |
Hi @chargome! Oops. Good catch. Originally I did not specify any integrations and added this (incorrectly configured). I just tried it with Both yield the same outcome with only seeing pg-pool getting wrapped and not seeing the postgres query spans.
|
Ok so sadly no quick fix 😅 – I'll check out your repro today. |
@finack I had a go at this today and was able to reproduce it but sadly couldn't pin down the issue exactly. What I did find out using I was able to fix this though by setting the build output in the remix vite plugin to: remix({
serverModuleFormat: "cjs",
serverBuildFile: "index.cjs",
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}), and updating the start command to I hope that unblocks you for now until we have found what the underlying issue is! |
@chargome I briefly tried this on our production app but I am getting a bunch of build and runtime errors with libraries we are using (eg |
Seeing the same behavior in Bun using Only
I also tried using a pnpm resolution to pin |
@bnussman thanks for reporting, we'll try to find out if the issue is linked. |
This may not help @finack , but I was able to fix my bun issue by simplily changing import { Pool } from "pg"; to const { Pool } = require("pg"); |
Opened a PR upstream that should resolve this: open-telemetry/opentelemetry-js-contrib#2563 |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/remix
SDK Version
8.37.1
Framework Version
React 18.2.0
Link to Sentry event
https://blaide.sentry.io/performance/trace/3eb527c0f79f145a3d7c59e8d52ade3f/?pageEnd&pageStart&project=4508270748368896&source=traces&statsPeriod=1h×tamp=1731368996.911
Reproduction Example/SDK Setup
You can find a repo to run this at finack/sentry-report.
You will need to
DATABASE_URL
andSENTRY_DSN
in.env
npx drizzle-kit push
to initialize databasenpm run dev:sentry
to run the dev serverlocalhost:5173/user
I tried upgrading the
@opentelemetry/instrumentation-pg
to the latest but this did not change anything.I added a bunch of
console.log
to the opentelemetry/instrumentation-pg and could see thepg-pool
wrappings fire, but not thepg
ones. I suspect this is an issue with opentelemetry not detecting the pg module but have not verified that.Steps to Reproduce
localhost:5173/user
Expected Result
In the trace I expect to see the postgres queries themselves. Not the query plan, but just the queries being fired and how long they take.
Actual Result
I am seeing the
pg-pool connect
span, but not any of the postgres query spans.Debug output
This was ran from
npm run build && npm run start
The text was updated successfully, but these errors were encountered: