Skip to content

Commit 8fa0d9c

Browse files
committed
Remove legacyErrorAttributes
1 parent 8dd8ef1 commit 8fa0d9c

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

packages/remix/src/vendor/instrumentation.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,12 @@ export interface RemixInstrumentationConfig extends InstrumentationConfig {
5656
* @default { _action: "actionType" }
5757
*/
5858
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;
6459
}
6560

6661
const DEFAULT_CONFIG: RemixInstrumentationConfig = {
6762
actionFormDataAttributes: {
6863
_action: 'actionType',
6964
},
70-
legacyErrorAttributes: false,
7165
};
7266

7367
export class RemixInstrumentation extends InstrumentationBase {
@@ -347,10 +341,6 @@ export class RemixInstrumentation extends InstrumentationBase {
347341

348342
private _addErrorToSpan(span: Span, error: Error): void {
349343
addErrorEventToSpan(span, error);
350-
351-
if (this.getConfig().legacyErrorAttributes || false) {
352-
addErrorAttributesToSpan(span, error);
353-
}
354344
}
355345
}
356346

@@ -383,13 +373,3 @@ const addErrorEventToSpan = (span: Span, error: Error): void => {
383373
span.recordException(error);
384374
span.setStatus({ code: SpanStatusCode.ERROR, message: error.message });
385375
};
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

Comments
 (0)