Update test framework: fix run_tests.py to support all test files, add auto-import-check for test files

This commit is contained in:
qiaoxinjiu
2026-05-09 15:11:30 +08:00
parent eb053a347f
commit eaba8328da
21739 changed files with 2236758 additions and 719 deletions

View File

@@ -0,0 +1,11 @@
import { Context, TextMapGetter, TextMapPropagator, TextMapSetter } from '@opentelemetry/api';
/**
* Propagator for the B3 multiple-header HTTP format.
* Based on: https://github.com/openzipkin/b3-propagation
*/
export declare class B3MultiPropagator implements TextMapPropagator {
inject(context: Context, carrier: unknown, setter: TextMapSetter): void;
extract(context: Context, carrier: unknown, getter: TextMapGetter): Context;
fields(): string[];
}
//# sourceMappingURL=B3MultiPropagator.d.ts.map

View File

@@ -0,0 +1,117 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { isSpanContextValid, isValidSpanId, isValidTraceId, trace, TraceFlags, } from '@opentelemetry/api';
import { isTracingSuppressed } from '@opentelemetry/core';
import { B3_DEBUG_FLAG_KEY } from './common';
import { X_B3_FLAGS, X_B3_PARENT_SPAN_ID, X_B3_SAMPLED, X_B3_SPAN_ID, X_B3_TRACE_ID, } from './constants';
const VALID_SAMPLED_VALUES = new Set([true, 'true', 'True', '1', 1]);
const VALID_UNSAMPLED_VALUES = new Set([false, 'false', 'False', '0', 0]);
function isValidSampledValue(sampled) {
return sampled === TraceFlags.SAMPLED || sampled === TraceFlags.NONE;
}
function parseHeader(header) {
return Array.isArray(header) ? header[0] : header;
}
function getHeaderValue(carrier, getter, key) {
const header = getter.get(carrier, key);
return parseHeader(header);
}
function getTraceId(carrier, getter) {
const traceId = getHeaderValue(carrier, getter, X_B3_TRACE_ID);
if (typeof traceId === 'string') {
return traceId.padStart(32, '0');
}
return '';
}
function getSpanId(carrier, getter) {
const spanId = getHeaderValue(carrier, getter, X_B3_SPAN_ID);
if (typeof spanId === 'string') {
return spanId;
}
return '';
}
function getDebug(carrier, getter) {
const debug = getHeaderValue(carrier, getter, X_B3_FLAGS);
return debug === '1' ? '1' : undefined;
}
function getTraceFlags(carrier, getter) {
const traceFlags = getHeaderValue(carrier, getter, X_B3_SAMPLED);
const debug = getDebug(carrier, getter);
if (debug === '1' || VALID_SAMPLED_VALUES.has(traceFlags)) {
return TraceFlags.SAMPLED;
}
if (traceFlags === undefined || VALID_UNSAMPLED_VALUES.has(traceFlags)) {
return TraceFlags.NONE;
}
// This indicates to isValidSampledValue that this is not valid
return;
}
/**
* Propagator for the B3 multiple-header HTTP format.
* Based on: https://github.com/openzipkin/b3-propagation
*/
export class B3MultiPropagator {
inject(context, carrier, setter) {
const spanContext = trace.getSpanContext(context);
if (!spanContext ||
!isSpanContextValid(spanContext) ||
isTracingSuppressed(context))
return;
const debug = context.getValue(B3_DEBUG_FLAG_KEY);
setter.set(carrier, X_B3_TRACE_ID, spanContext.traceId);
setter.set(carrier, X_B3_SPAN_ID, spanContext.spanId);
// According to the B3 spec, if the debug flag is set,
// the sampled flag shouldn't be propagated as well.
if (debug === '1') {
setter.set(carrier, X_B3_FLAGS, debug);
}
else if (spanContext.traceFlags !== undefined) {
// We set the header only if there is an existing sampling decision.
// Otherwise we will omit it => Absent.
setter.set(carrier, X_B3_SAMPLED, (TraceFlags.SAMPLED & spanContext.traceFlags) === TraceFlags.SAMPLED
? '1'
: '0');
}
}
extract(context, carrier, getter) {
const traceId = getTraceId(carrier, getter);
const spanId = getSpanId(carrier, getter);
const traceFlags = getTraceFlags(carrier, getter);
const debug = getDebug(carrier, getter);
if (isValidTraceId(traceId) &&
isValidSpanId(spanId) &&
isValidSampledValue(traceFlags)) {
context = context.setValue(B3_DEBUG_FLAG_KEY, debug);
return trace.setSpanContext(context, {
traceId,
spanId,
isRemote: true,
traceFlags,
});
}
return context;
}
fields() {
return [
X_B3_TRACE_ID,
X_B3_SPAN_ID,
X_B3_FLAGS,
X_B3_SAMPLED,
X_B3_PARENT_SPAN_ID,
];
}
}
//# sourceMappingURL=B3MultiPropagator.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,20 @@
import { Context, TextMapGetter, TextMapPropagator, TextMapSetter } from '@opentelemetry/api';
import { B3PropagatorConfig } from './types';
/**
* Propagator that extracts B3 context in both single and multi-header variants,
* with configurable injection format defaulting to B3 single-header. Due to
* the asymmetry in injection and extraction formats this is not suitable to
* be implemented as a composite propagator.
* Based on: https://github.com/openzipkin/b3-propagation
*/
export declare class B3Propagator implements TextMapPropagator {
private readonly _b3MultiPropagator;
private readonly _b3SinglePropagator;
private readonly _inject;
readonly _fields: string[];
constructor(config?: B3PropagatorConfig);
inject(context: Context, carrier: unknown, setter: TextMapSetter): void;
extract(context: Context, carrier: unknown, getter: TextMapGetter): Context;
fields(): string[];
}
//# sourceMappingURL=B3Propagator.d.ts.map

View File

@@ -0,0 +1,63 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { isTracingSuppressed } from '@opentelemetry/core';
import { B3MultiPropagator } from './B3MultiPropagator';
import { B3SinglePropagator } from './B3SinglePropagator';
import { B3_CONTEXT_HEADER } from './constants';
import { B3InjectEncoding } from './types';
/**
* Propagator that extracts B3 context in both single and multi-header variants,
* with configurable injection format defaulting to B3 single-header. Due to
* the asymmetry in injection and extraction formats this is not suitable to
* be implemented as a composite propagator.
* Based on: https://github.com/openzipkin/b3-propagation
*/
export class B3Propagator {
_b3MultiPropagator = new B3MultiPropagator();
_b3SinglePropagator = new B3SinglePropagator();
_inject;
_fields;
constructor(config = {}) {
if (config.injectEncoding === B3InjectEncoding.MULTI_HEADER) {
this._inject = this._b3MultiPropagator.inject;
this._fields = this._b3MultiPropagator.fields();
}
else {
this._inject = this._b3SinglePropagator.inject;
this._fields = this._b3SinglePropagator.fields();
}
}
inject(context, carrier, setter) {
if (isTracingSuppressed(context)) {
return;
}
this._inject(context, carrier, setter);
}
extract(context, carrier, getter) {
const header = getter.get(carrier, B3_CONTEXT_HEADER);
const b3Context = Array.isArray(header) ? header[0] : header;
if (b3Context) {
return this._b3SinglePropagator.extract(context, carrier, getter);
}
else {
return this._b3MultiPropagator.extract(context, carrier, getter);
}
}
fields() {
return this._fields;
}
}
//# sourceMappingURL=B3Propagator.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"B3Propagator.js","sourceRoot":"","sources":["../../src/B3Propagator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAsB,MAAM,SAAS,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,OAAO,YAAY;IACN,kBAAkB,GACjC,IAAI,iBAAiB,EAAE,CAAC;IACT,mBAAmB,GAClC,IAAI,kBAAkB,EAAE,CAAC;IACV,OAAO,CAId;IACM,OAAO,CAAW;IAElC,YAAY,SAA6B,EAAE;QACzC,IAAI,MAAM,CAAC,cAAc,KAAK,gBAAgB,CAAC,YAAY,EAAE;YAC3D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;YAC9C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;SACjD;aAAM;YACL,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC;YAC/C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC;SAClD;IACH,CAAC;IAED,MAAM,CAAC,OAAgB,EAAE,OAAgB,EAAE,MAAqB;QAC9D,IAAI,mBAAmB,CAAC,OAAO,CAAC,EAAE;YAChC,OAAO;SACR;QACD,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,CAAC,OAAgB,EAAE,OAAgB,EAAE,MAAqB;QAC/D,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QACtD,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAE7D,IAAI,SAAS,EAAE;YACb,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;SACnE;aAAM;YACL,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;SAClE;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Context,\n TextMapGetter,\n TextMapPropagator,\n TextMapSetter,\n} from '@opentelemetry/api';\nimport { isTracingSuppressed } from '@opentelemetry/core';\nimport { B3MultiPropagator } from './B3MultiPropagator';\nimport { B3SinglePropagator } from './B3SinglePropagator';\nimport { B3_CONTEXT_HEADER } from './constants';\nimport { B3InjectEncoding, B3PropagatorConfig } from './types';\n\n/**\n * Propagator that extracts B3 context in both single and multi-header variants,\n * with configurable injection format defaulting to B3 single-header. Due to\n * the asymmetry in injection and extraction formats this is not suitable to\n * be implemented as a composite propagator.\n * Based on: https://github.com/openzipkin/b3-propagation\n */\nexport class B3Propagator implements TextMapPropagator {\n private readonly _b3MultiPropagator: B3MultiPropagator =\n new B3MultiPropagator();\n private readonly _b3SinglePropagator: B3SinglePropagator =\n new B3SinglePropagator();\n private readonly _inject: (\n context: Context,\n carrier: unknown,\n setter: TextMapSetter\n ) => void;\n public readonly _fields: string[];\n\n constructor(config: B3PropagatorConfig = {}) {\n if (config.injectEncoding === B3InjectEncoding.MULTI_HEADER) {\n this._inject = this._b3MultiPropagator.inject;\n this._fields = this._b3MultiPropagator.fields();\n } else {\n this._inject = this._b3SinglePropagator.inject;\n this._fields = this._b3SinglePropagator.fields();\n }\n }\n\n inject(context: Context, carrier: unknown, setter: TextMapSetter): void {\n if (isTracingSuppressed(context)) {\n return;\n }\n this._inject(context, carrier, setter);\n }\n\n extract(context: Context, carrier: unknown, getter: TextMapGetter): Context {\n const header = getter.get(carrier, B3_CONTEXT_HEADER);\n const b3Context = Array.isArray(header) ? header[0] : header;\n\n if (b3Context) {\n return this._b3SinglePropagator.extract(context, carrier, getter);\n } else {\n return this._b3MultiPropagator.extract(context, carrier, getter);\n }\n }\n\n fields(): string[] {\n return this._fields;\n }\n}\n"]}

View File

@@ -0,0 +1,11 @@
import { Context, TextMapGetter, TextMapPropagator, TextMapSetter } from '@opentelemetry/api';
/**
* Propagator for the B3 single-header HTTP format.
* Based on: https://github.com/openzipkin/b3-propagation
*/
export declare class B3SinglePropagator implements TextMapPropagator {
inject(context: Context, carrier: unknown, setter: TextMapSetter): void;
extract(context: Context, carrier: unknown, getter: TextMapGetter): Context;
fields(): string[];
}
//# sourceMappingURL=B3SinglePropagator.d.ts.map

View File

@@ -0,0 +1,75 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { isSpanContextValid, isValidSpanId, isValidTraceId, trace, TraceFlags, } from '@opentelemetry/api';
import { isTracingSuppressed } from '@opentelemetry/core';
import { B3_DEBUG_FLAG_KEY } from './common';
import { B3_CONTEXT_HEADER } from './constants';
const B3_CONTEXT_REGEX = /((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/;
const PADDING = '0'.repeat(16);
const SAMPLED_VALUES = new Set(['d', '1']);
const DEBUG_STATE = 'd';
function convertToTraceId128(traceId) {
return traceId.length === 32 ? traceId : `${PADDING}${traceId}`;
}
function convertToTraceFlags(samplingState) {
if (samplingState && SAMPLED_VALUES.has(samplingState)) {
return TraceFlags.SAMPLED;
}
return TraceFlags.NONE;
}
/**
* Propagator for the B3 single-header HTTP format.
* Based on: https://github.com/openzipkin/b3-propagation
*/
export class B3SinglePropagator {
inject(context, carrier, setter) {
const spanContext = trace.getSpanContext(context);
if (!spanContext ||
!isSpanContextValid(spanContext) ||
isTracingSuppressed(context))
return;
const samplingState = context.getValue(B3_DEBUG_FLAG_KEY) || spanContext.traceFlags & 0x1;
const value = `${spanContext.traceId}-${spanContext.spanId}-${samplingState}`;
setter.set(carrier, B3_CONTEXT_HEADER, value);
}
extract(context, carrier, getter) {
const header = getter.get(carrier, B3_CONTEXT_HEADER);
const b3Context = Array.isArray(header) ? header[0] : header;
if (typeof b3Context !== 'string')
return context;
const match = b3Context.match(B3_CONTEXT_REGEX);
if (!match)
return context;
const [, extractedTraceId, spanId, samplingState] = match;
const traceId = convertToTraceId128(extractedTraceId);
if (!isValidTraceId(traceId) || !isValidSpanId(spanId))
return context;
const traceFlags = convertToTraceFlags(samplingState);
if (samplingState === DEBUG_STATE) {
context = context.setValue(B3_DEBUG_FLAG_KEY, samplingState);
}
return trace.setSpanContext(context, {
traceId,
spanId,
isRemote: true,
traceFlags,
});
}
fields() {
return [B3_CONTEXT_HEADER];
}
}
//# sourceMappingURL=B3SinglePropagator.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
/** shared context for storing an extracted b3 debug flag */
export declare const B3_DEBUG_FLAG_KEY: symbol;
//# sourceMappingURL=common.d.ts.map

View File

@@ -0,0 +1,19 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createContextKey } from '@opentelemetry/api';
/** shared context for storing an extracted b3 debug flag */
export const B3_DEBUG_FLAG_KEY = createContextKey('OpenTelemetry Context Key B3 Debug Flag');
//# sourceMappingURL=common.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,4DAA4D;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,gBAAgB,CAC/C,yCAAyC,CAC1C,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createContextKey } from '@opentelemetry/api';\n\n/** shared context for storing an extracted b3 debug flag */\nexport const B3_DEBUG_FLAG_KEY = createContextKey(\n 'OpenTelemetry Context Key B3 Debug Flag'\n);\n"]}

View File

@@ -0,0 +1,8 @@
/** B3 single-header key */
export declare const B3_CONTEXT_HEADER = "b3";
export declare const X_B3_TRACE_ID = "x-b3-traceid";
export declare const X_B3_SPAN_ID = "x-b3-spanid";
export declare const X_B3_SAMPLED = "x-b3-sampled";
export declare const X_B3_PARENT_SPAN_ID = "x-b3-parentspanid";
export declare const X_B3_FLAGS = "x-b3-flags";
//# sourceMappingURL=constants.d.ts.map

View File

@@ -0,0 +1,24 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** B3 single-header key */
export const B3_CONTEXT_HEADER = 'b3';
/* b3 multi-header keys */
export const X_B3_TRACE_ID = 'x-b3-traceid';
export const X_B3_SPAN_ID = 'x-b3-spanid';
export const X_B3_SAMPLED = 'x-b3-sampled';
export const X_B3_PARENT_SPAN_ID = 'x-b3-parentspanid';
export const X_B3_FLAGS = 'x-b3-flags';
//# sourceMappingURL=constants.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAEtC,0BAA0B;AAC1B,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAC5C,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAC1C,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AACvD,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** B3 single-header key */\nexport const B3_CONTEXT_HEADER = 'b3';\n\n/* b3 multi-header keys */\nexport const X_B3_TRACE_ID = 'x-b3-traceid';\nexport const X_B3_SPAN_ID = 'x-b3-spanid';\nexport const X_B3_SAMPLED = 'x-b3-sampled';\nexport const X_B3_PARENT_SPAN_ID = 'x-b3-parentspanid';\nexport const X_B3_FLAGS = 'x-b3-flags';\n"]}

View File

@@ -0,0 +1,4 @@
export { B3Propagator } from './B3Propagator';
export { B3_CONTEXT_HEADER, X_B3_FLAGS, X_B3_PARENT_SPAN_ID, X_B3_SAMPLED, X_B3_SPAN_ID, X_B3_TRACE_ID, } from './constants';
export { B3InjectEncoding, B3PropagatorConfig } from './types';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,19 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { B3Propagator } from './B3Propagator';
export { B3_CONTEXT_HEADER, X_B3_FLAGS, X_B3_PARENT_SPAN_ID, X_B3_SAMPLED, X_B3_SPAN_ID, X_B3_TRACE_ID, } from './constants';
export { B3InjectEncoding } from './types';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAsB,MAAM,SAAS,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { B3Propagator } from './B3Propagator';\nexport {\n B3_CONTEXT_HEADER,\n X_B3_FLAGS,\n X_B3_PARENT_SPAN_ID,\n X_B3_SAMPLED,\n X_B3_SPAN_ID,\n X_B3_TRACE_ID,\n} from './constants';\nexport { B3InjectEncoding, B3PropagatorConfig } from './types';\n"]}

View File

@@ -0,0 +1,10 @@
/** Enumeration of B3 inject encodings */
export declare enum B3InjectEncoding {
SINGLE_HEADER = 0,
MULTI_HEADER = 1
}
/** Configuration for the B3Propagator */
export interface B3PropagatorConfig {
injectEncoding?: B3InjectEncoding;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,22 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** Enumeration of B3 inject encodings */
export var B3InjectEncoding;
(function (B3InjectEncoding) {
B3InjectEncoding[B3InjectEncoding["SINGLE_HEADER"] = 0] = "SINGLE_HEADER";
B3InjectEncoding[B3InjectEncoding["MULTI_HEADER"] = 1] = "MULTI_HEADER";
})(B3InjectEncoding || (B3InjectEncoding = {}));
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,yCAAyC;AACzC,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,yEAAa,CAAA;IACb,uEAAY,CAAA;AACd,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** Enumeration of B3 inject encodings */\nexport enum B3InjectEncoding {\n SINGLE_HEADER,\n MULTI_HEADER,\n}\n\n/** Configuration for the B3Propagator */\nexport interface B3PropagatorConfig {\n injectEncoding?: B3InjectEncoding;\n}\n"]}

View File

@@ -0,0 +1,2 @@
export declare const VERSION = "2.0.0";
//# sourceMappingURL=version.d.ts.map

View File

@@ -0,0 +1,18 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// this is autogenerated file, see scripts/version-update.js
export const VERSION = '2.0.0';
//# sourceMappingURL=version.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '2.0.0';\n"]}