From cb1d08364884d7495eb5386763f5c677258e5dd3 Mon Sep 17 00:00:00 2001 From: Katie Byers Date: Wed, 2 Dec 2020 11:47:02 -0800 Subject: [PATCH 1/2] pass router to integration rather than app --- src/platforms/node/guides/express/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/node/guides/express/index.mdx b/src/platforms/node/guides/express/index.mdx index 89e69ef3e6c95..d0551d63455e6 100644 --- a/src/platforms/node/guides/express/index.mdx +++ b/src/platforms/node/guides/express/index.mdx @@ -165,7 +165,7 @@ Sentry.init({ // enable HTTP calls tracing new Sentry.Integrations.Http({ tracing: true }), // enable Express.js middleware tracing - new Tracing.Integrations.Express({ app }), + new Tracing.Integrations.Express({ app.router }), ], // We recommend adjusting this value in production, or using tracesSampler From a2338c77ffcb1d61e8fd341579741e8977a2565f Mon Sep 17 00:00:00 2001 From: Katie Byers Date: Wed, 2 Dec 2020 12:23:35 -0800 Subject: [PATCH 2/2] fix the fix --- src/platforms/node/guides/express/index.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/platforms/node/guides/express/index.mdx b/src/platforms/node/guides/express/index.mdx index d0551d63455e6..cfa6f601c7357 100644 --- a/src/platforms/node/guides/express/index.mdx +++ b/src/platforms/node/guides/express/index.mdx @@ -165,7 +165,12 @@ Sentry.init({ // enable HTTP calls tracing new Sentry.Integrations.Http({ tracing: true }), // enable Express.js middleware tracing - new Tracing.Integrations.Express({ app.router }), + new Tracing.Integrations.Express({ + // to trace all requests to the default router + app, + // alternatively, you can specify the routes you want to trace: + // router: someRouter, + }), ], // We recommend adjusting this value in production, or using tracesSampler