Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private _exportInfo(span: ReadableSpan) {
return {
traceId: span.spanContext.traceId,
parentId: span.parentSpanId,
name: span.name,
id: span.spanContext.spanId,
kind: span.kind,
timestamp: hrTimeToMicroseconds(span.startTime),
duration: hrTimeToMicroseconds(span.duration),
attributes: span.attributes,
status: span.status,
events: span.events,
};
}
return events.map(event => ({
timestamp: hrTimeToMicroseconds(event.time),
value: event.name,
}));
}
private _exportInfo(span: ReadableSpan) {
return {
traceId: span.spanContext.traceId,
parentId: span.parentSpanId,
name: span.name,
id: span.spanContext.spanId,
kind: span.kind,
timestamp: hrTimeToMicroseconds(span.startTime),
duration: hrTimeToMicroseconds(span.duration),
attributes: span.attributes,
status: span.status,
events: span.events,
};
}
);
}
return { timestamp: hrTimeToMilliseconds(event.time), fields };
}
);
const spanLogs: ThriftLog[] = ThriftUtils.getThriftLogs(logs);
return {
traceIdLow: Utils.encodeInt64(traceIdLow),
traceIdHigh: Utils.encodeInt64(traceIdHigh),
spanId: Utils.encodeInt64(span.spanContext.spanId),
parentSpanId: parentSpan,
operationName: span.name,
references: spanLinksToThriftRefs(span.links, span.parentSpanId),
flags: span.spanContext.traceFlags || DEFAULT_FLAGS,
startTime: Utils.encodeInt64(hrTimeToMicroseconds(span.startTime)),
duration: Utils.encodeInt64(hrTimeToMicroseconds(span.duration)),
tags: spanTags,
logs: spanLogs,
};
}