@vtex/api
Version:
VTEX I/O API client
10 lines (9 loc) • 508 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSpanReference = void 0;
const opentracing_1 = require("opentracing");
const SpanReferenceTypes_1 = require("./SpanReferenceTypes");
function createSpanReference(span, type) {
return new opentracing_1.Reference(type === SpanReferenceTypes_1.SpanReferenceTypes.CHILD_OF ? opentracing_1.REFERENCE_CHILD_OF : opentracing_1.REFERENCE_FOLLOWS_FROM, span.context());
}
exports.createSpanReference = createSpanReference;