Skip to content

Commit

Permalink
fix: span emit warnings on express instrumentation
Browse files Browse the repository at this point in the history
Signed-off-by: San 'rdn' Mônico <[email protected]>
  • Loading branch information
ReDemoNBR committed Jan 7, 2024
1 parent 33b31d0 commit 97929c7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export class ExpressInstrumentation extends InstrumentationBase<
const isError = ![undefined, null, 'route', 'router'].includes(
maybeError
);
if (isError) {
if (!spanHasEnded && isError) {
const [error, message] = asErrorAndMessage(maybeError);
span.recordException(error);
span.setStatus({
Expand Down

0 comments on commit 97929c7

Please sign in to comment.