Description
Environment
SaaS (https://sentry.io/)
What are you trying to accomplish?
I've added in the appropriate database integrations to see db queries in my transactions:
https://docs.sentry.io/platforms/node/performance/database/
How are you getting stuck?
Database queries are not being detected and showing up for some transactions.
Sentry initialization:
import * as Sentry from "@sentry/node";
import {ProfilingIntegration} from "@sentry/profiling-node";
import {sentryAddMetrics} from "@/middleware/sentryAddMetrics";
export function initSentry(app): void {
const isProd = process.env.REACT_APP_ENVIRONMENT === "production";
Sentry.init({
dsn: "...",
environment: process.env.REACT_APP_ENVIRONMENT,
integrations: [
new ProfilingIntegration(),
new Sentry.Integrations.Express({
// to trace all requests to the default router
app
}),
new Sentry.Integrations.Mongo({
useMongoose: true
}),
new Sentry.Integrations.Http({tracing: true})
],
beforeSend: (event, hint) => {
const error: any = hint.originalException;
if (error && (
(error.status && error.status < 500) ||
(error.httpStatus && error.httpStatus < 500)
)) {
return null
}
return event;
},
// Performance Monitoring
tracesSampleRate: isProd ? 0.1 : 1.0,
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
});
app.use(Sentry.Handlers.requestHandler())
app.use(Sentry.Handlers.tracingHandler())
app.use(sentryAddMetrics);
}
Where in the product are you?
Performance
Link
No response
DSN
https://524f54dda82743f3445b4f28533ef38d@o4505830066159616.ingest.sentry.io/4505869944881152
Version
No response
Metadata
Metadata
Assignees
Type
Projects
Status
No status
Status
No status