perf: Sentry perf tracing (#17202)
* chore: Add Sentry perf tracing * Just to build * perf: Add Sentry perf tracing * Removed the extra integrations tracing config * Got spans working * Now only tracing individual endpoints * Removed check for booking event type * Fixed types * Added back for spans * Consolidate sentry imports * Added more traces * Moved the start of the span
This commit is contained in:
1 parent
5a9197f357
commit
4b6b9badf5
12 files changed
+311
-274
No files matched your search
@@ -663,7 +663,7 @@ const nextConfig = {
|
||||
if (!!process.env.NEXT_PUBLIC_SENTRY_DSN) {
|
||||
plugins.push((nextConfig) =>
|
||||
withSentryConfig(nextConfig, {
|
||||
autoInstrumentServerFunctions: true,
|
||||
autoInstrumentServerFunctions: false,
|
||||
hideSourceMaps: true,
|
||||
// disable source map generation for the server code
|
||||
disableServerWebpackPlugin: !!process.env.SENTRY_DISABLE_SERVER_WEBPACK_PLUGIN,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { wrapApiHandlerWithSentry } from "@sentry/nextjs";
|
||||
|
||||
import { createNextApiHandler } from "@calcom/trpc/server/createNextApiHandler";
|
||||
import { highPerfRouter } from "@calcom/trpc/server/routers/viewer/highPerf/_router";
|
||||
|
||||
export default createNextApiHandler(highPerfRouter);
|
||||
export default wrapApiHandlerWithSentry(createNextApiHandler(highPerfRouter), "/api/trpc/highPerf/[trpc]");
|
||||
@@ -2,4 +2,5 @@ import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
tracesSampleRate: parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE ?? "0.0") || 0.0,
|
||||
});
|
||||
Reference in new issue
Block a user