UNPKG

node-dubbo-sleuth

Version:
15 lines (14 loc) 904 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const node_sleuth_1 = require("node-sleuth"); class DubboInjector extends node_sleuth_1.AbstractInjector { constructor() { super(DubboInjector.TRACE_ID_NAME, DubboInjector.SPAN_ID_NAME, DubboInjector.PARENT_SPAN_ID_NAME, DubboInjector.SAMPLED_NAME, DubboInjector.FLAGS_NAME); } } exports.DubboInjector = DubboInjector; DubboInjector.TRACE_ID_NAME = node_sleuth_1.HttpHeaders.TraceId; // traceIdKey -> 'X-B3-TraceId' DubboInjector.SPAN_ID_NAME = node_sleuth_1.HttpHeaders.SpanId; // spanIdKey -> 'X-B3-SpanId' DubboInjector.PARENT_SPAN_ID_NAME = node_sleuth_1.HttpHeaders.ParentSpanId; // parentSpanIdKey -> 'X-B3-ParentSpanId' DubboInjector.SAMPLED_NAME = node_sleuth_1.HttpHeaders.Sampled; // sampledKey -> 'X-B3-Sampled' DubboInjector.FLAGS_NAME = node_sleuth_1.HttpHeaders.Flags; // debugKey -> 'X-B3-Flags'