Skip to content

Commit 5a4838e

Browse files
authored
fix: Span fields when JSON-serialized (#2862)
The 'status' field was not part of the type definition, even though we set it, while the 'sampled' field should not be part of the JSON-serialized span.
1 parent 71add87 commit 5a4838e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/apm/src/span.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@ export class Span implements SpanInterface, SpanContext {
278278
description?: string;
279279
op?: string;
280280
parent_span_id?: string;
281-
sampled?: boolean;
282281
span_id: string;
283282
start_timestamp: number;
283+
status?: string;
284284
tags?: { [key: string]: string };
285285
timestamp?: number;
286286
trace_id: string;

packages/tracing/src/span.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ export class Span implements SpanInterface, SpanContext {
307307
description?: string;
308308
op?: string;
309309
parent_span_id?: string;
310-
sampled?: boolean;
311310
span_id: string;
312311
start_timestamp: number;
312+
status?: string;
313313
tags?: { [key: string]: string };
314314
timestamp?: number;
315315
trace_id: string;

packages/types/src/span.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ export interface Span extends SpanContext {
158158
description?: string;
159159
op?: string;
160160
parent_span_id?: string;
161-
sampled?: boolean;
162161
span_id: string;
163162
start_timestamp: number;
163+
status?: string;
164164
tags?: { [key: string]: string };
165165
timestamp?: number;
166166
trace_id: string;

0 commit comments

Comments
 (0)