Skip to content

Commit

Permalink
fix test?
Browse files Browse the repository at this point in the history
  • Loading branch information
Lms24 committed Sep 18, 2024
1 parent 79921ff commit d35b8f8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ app.get('/test', (_req, res) => {
Sentry.getClient().on('beforeEnvelope', envelope => {
const event = envelope[1][0][1];
if (event.exception.values[0].value === 'This is a test error') {
const { trace_id, span_id } = event.contexts.trace;
res.send({
traceData: Sentry.getTraceData(),
traceMetaTags: Sentry.getTraceMetaTags(),
errorTraceContext: event.contexts.trace,
errorTraceContext: {
trace_id,
span_id,
},
});
}
});
Expand Down

0 comments on commit d35b8f8

Please sign in to comment.