Skip to content

Commit 9a6c949

Browse files
committed
ref: Fix span json format
1 parent f3df061 commit 9a6c949

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/opentracing/src/span.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ export class Span extends opentracing.Span implements SpanInterface {
133133
*/
134134
public toJSON(): object {
135135
return {
136-
finishTime: (this.finishTime && this.finishTime / 1000) || undefined,
136+
finish_time: (this.finishTime && this.finishTime / 1000) || undefined,
137137
logs: this.logs.length === 0 ? undefined : this.logs,
138138
operation: this.operation,
139139
references: this.references && this.references,
140-
spanId: this.spanContext.spanId,
141-
startTime: this.startTime / 1000,
140+
span_id: this.spanContext.spanId,
141+
start_time: this.startTime / 1000,
142142
tags: Object.keys(this.tags).length === 0 ? undefined : this.tags,
143-
traceId: this.spanContext.traceId,
143+
trace_id: this.spanContext.traceId,
144144
};
145145
}
146146
}

0 commit comments

Comments
 (0)