Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Fix for non-null parentSpanId
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan Colgate committed Jun 27, 2018
1 parent 62f5859 commit f62d08e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ export function spanToThrift(span: Span) {
const spanLogs = [];
const unsigned = true;
const length = span.spanContext.traceId.length;
const parentSpan = span.parentSpanId ? Utils.encodeInt64(span.parentSpanId) : ThriftUtils.emptyBuffer;

return {
traceIdLow: Utils.encodeInt64(span.spanContext.traceId),
traceIdHigh: ThriftUtils.emptyBuffer,
spanId: Utils.encodeInt64(span.spanContext.spanId),
parentSpanId: span.parentSpanId || ThriftUtils.emptyBuffer,
parentSpanId: parentSpan,
operationName: span.name,
references: [],
flags: span.spanContext.options || 0x1,
Expand Down

0 comments on commit f62d08e

Please sign in to comment.