Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/core/src/tracing/sentrySpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import type {
} from '../types-hoist';
import type { SpanLink } from '../types-hoist/link';
import { logger } from '../utils-hoist/logger';
import { dropUndefinedKeys } from '../utils-hoist/object';
import { generateSpanId, generateTraceId } from '../utils-hoist/propagationContext';
import { timestampInSeconds } from '../utils-hoist/time';
import {
Expand Down Expand Up @@ -223,7 +222,7 @@ export class SentrySpan implements Span {
* use `spanToJSON(span)` instead.
*/
public getSpanJSON(): SpanJSON {
return dropUndefinedKeys({
return {
data: this._attributes,
description: this._name,
op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],
Expand All @@ -240,7 +239,7 @@ export class SentrySpan implements Span {
is_segment: (this._isStandaloneSpan && getRootSpan(this) === this) || undefined,
segment_id: this._isStandaloneSpan ? getRootSpan(this).spanContext().spanId : undefined,
links: convertSpanLinksForEnvelope(this._links),
});
};
}

/** @inheritdoc */
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/utils/spanUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function spanToJSON(span: Span): SpanJSON {
if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {
const { attributes, startTime, name, endTime, parentSpanId, status, links } = span;

return dropUndefinedKeys({
return {
span_id,
trace_id,
data: attributes,
Expand All @@ -160,7 +160,7 @@ export function spanToJSON(span: Span): SpanJSON {
op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],
origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,
links: convertSpanLinksForEnvelope(links),
});
};
}

// Finally, at least we have `spanContext()`....
Expand Down
Loading