Skip to content

Commit

Permalink
Added missing wrapping span
Browse files Browse the repository at this point in the history
ref abff2da

- this was missed from the previous commit and is needed so we pass down
  tracing context
  • Loading branch information
daniellockyer committed Nov 18, 2024
1 parent abff2da commit 8494784
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
},
);
});
});

Expand Down

0 comments on commit 8494784

Please sign in to comment.