-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
In my application, I do throw errors but they are fully recoverable.
So for instance, I would have
export class RecoverableError extends Error {}
export class MissingAccountError extends RecoverableError extends Error {}
When I throw a recoverable error, I would like the span to NOT be set to error.
I would be ready to override this behavior with DI, but your code is calling a static method directly so it's impossible for me to easily bypass this functionality.
nestjs-ddtrace/src/decorator.injector.ts
Lines 70 to 72 in c16fae0
| private static recordException(error, span: Span) { | |
| span.setTag('error', error); | |
| throw error; |
nestjs-ddtrace/src/decorator.injector.ts
Line 195 in c16fae0
| DecoratorInjector.recordException(error, span); |
I can't even catch this properly because this is an internal span that is created by the library.
It's also wrapped in an activate, which will also tag this as an error again.
vinnymac and julienlafont-shine
Metadata
Metadata
Assignees
Labels
No labels