Skip to content

Commit 06bccc6

Browse files
committed
reduce status message byte footprint
1 parent e5210d3 commit 06bccc6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packages/core/src/utils/spanUtils.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,12 @@ export function getStatusMessage(status: SpanStatus | undefined): string | undef
332332
* Convert the various statuses to the simple onces expected by Sentry for steamed spans ('ok' is default).
333333
*/
334334
export function getSimpleStatusMessage(status: SpanStatus | undefined): 'ok' | 'error' {
335-
if (
336-
!status ||
335+
return !status ||
337336
status.code === SPAN_STATUS_OK ||
338337
status.code === SPAN_STATUS_UNSET ||
339338
status.message === 'cancelled'
340-
) {
341-
return 'ok';
342-
}
343-
return 'error';
339+
? 'ok'
340+
: 'error';
344341
}
345342

346343
const CHILD_SPANS_FIELD = '_sentryChildSpans';

0 commit comments

Comments
 (0)