@@ -56,18 +56,12 @@ export interface RemixInstrumentationConfig extends InstrumentationConfig {
56
56
* @default { _action: "actionType" }
57
57
*/
58
58
actionFormDataAttributes ?: Record < string , boolean | string > ;
59
- /**
60
- * Whether to emit errors in the form of span attributes, as well as in span exception events.
61
- * Defaults to `false`, meaning that only span exception events are emitted.
62
- */
63
- legacyErrorAttributes ?: boolean ;
64
59
}
65
60
66
61
const DEFAULT_CONFIG : RemixInstrumentationConfig = {
67
62
actionFormDataAttributes : {
68
63
_action : 'actionType' ,
69
64
} ,
70
- legacyErrorAttributes : false ,
71
65
} ;
72
66
73
67
export class RemixInstrumentation extends InstrumentationBase {
@@ -347,10 +341,6 @@ export class RemixInstrumentation extends InstrumentationBase {
347
341
348
342
private _addErrorToSpan ( span : Span , error : Error ) : void {
349
343
addErrorEventToSpan ( span , error ) ;
350
-
351
- if ( this . getConfig ( ) . legacyErrorAttributes || false ) {
352
- addErrorAttributesToSpan ( span , error ) ;
353
- }
354
344
}
355
345
}
356
346
@@ -383,13 +373,3 @@ const addErrorEventToSpan = (span: Span, error: Error): void => {
383
373
span . recordException ( error ) ;
384
374
span . setStatus ( { code : SpanStatusCode . ERROR , message : error . message } ) ;
385
375
} ;
386
-
387
- const addErrorAttributesToSpan = ( span : Span , error : Error ) : void => {
388
- span . setAttribute ( 'error' , true ) ;
389
- if ( error . message ) {
390
- span . setAttribute ( SemanticAttributes . EXCEPTION_MESSAGE , error . message ) ;
391
- }
392
- if ( error . stack ) {
393
- span . setAttribute ( SemanticAttributes . EXCEPTION_STACKTRACE , error . stack ) ;
394
- }
395
- } ;
0 commit comments