Skip to content

Commit 5a74d31

Browse files
committed
return undefined if no links
1 parent 3ab4aa8 commit 5a74d31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/core/src/utils/spanUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export function spanToJSON(span: Span): SpanJSON {
158158
status: getStatusMessage(status),
159159
op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],
160160
origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,
161-
links: links ? convertSpanLinksForEnvelope(links) : undefined,
161+
links: convertSpanLinksForEnvelope(links),
162162
});
163163
}
164164

packages/opentelemetry/src/spanExporter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ function createAndFinishSpanForOtelSpan(node: SpanNode, spans: SpanJSON[], sentS
348348
op,
349349
origin,
350350
measurements: timedEventsToMeasurements(span.events),
351-
links: links ? convertSpanLinksForEnvelope(links) : undefined,
351+
links: convertSpanLinksForEnvelope(links),
352352
});
353353

354354
spans.push(spanJSON);

0 commit comments

Comments
 (0)