From 8494784485514d3da23f167ec0cb5f256ea14092 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Mon, 18 Nov 2024 12:40:20 +0100 Subject: [PATCH] Added missing wrapping span ref https://github.com/TryGhost/ActivityPub/commit/abff2da87edf602b175b87f2c02b7fffc37c03e8 - this was missed from the previous commit and is needed so we pass down tracing context --- src/app.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/app.ts b/src/app.ts index 70955709..be308f1a 100644 --- a/src/app.ts +++ b/src/app.ts @@ -403,9 +403,21 @@ app.use(async (ctx, next) => { return event; }); - return withContext(extra, () => { - return next(); - }); + return Sentry.startSpan( + { + op: 'http.server', + name: `${ctx.req.method} ${ctx.req.path}`, + attributes: { + ...extra, + 'service.name': 'activitypub', + }, + }, + () => { + return withContext(extra, () => { + return next(); + }); + }, + ); }); });