Skip to content

Commit

Permalink
chore: move tracecontext propagator into trace (#2155)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan authored Apr 29, 2021
1 parent 5641868 commit 677727b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 38 deletions.
27 changes: 0 additions & 27 deletions packages/opentelemetry-core/src/context/propagation/types.ts

This file was deleted.

13 changes: 6 additions & 7 deletions packages/opentelemetry-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,23 @@
* limitations under the License.
*/

export * from './baggage/propagation/HttpBaggage';
export * from './common/attributes';
export * from './common/global-error-handler';
export * from './common/logging-error-handler';
export * from './common/time';
export * from './common/types';
export * from './ExportResult';
export * from './version';
export * from './context/propagation/composite';
export * from './context/propagation/HttpTraceContext';
export * from './context/propagation/types';
export * from './baggage/propagation/HttpBaggage';
export * from './platform';
export * from './propagation/composite';
export * from './trace/HttpTraceContext';
export * from './trace/IdGenerator';
export * from './trace/sampler/AlwaysOffSampler';
export * from './trace/sampler/AlwaysOnSampler';
export * from './trace/sampler/ParentBasedSampler';
export * from './trace/sampler/TraceIdRatioBasedSampler';
export * from './trace/TraceState';
export * from './trace/IdGenerator';
export * from './utils/sampling';
export * from './utils/url';
export * from './utils/wrap';
export * from './utils/sampling';
export * from './version';
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@ import {
diag,
TextMapSetter,
} from '@opentelemetry/api';
import { CompositePropagatorConfig } from './types';

/** Configuration object for composite propagator */
export interface CompositePropagatorConfig {
/**
* List of propagators to run. Propagators run in the
* list order. If a propagator later in the list writes the same context
* key as a propagator earlier in the list, the later on will "win".
*/
propagators?: TextMapPropagator[];
}

/** Combines multiple propagators into a single propagator. */
export class CompositePropagator implements TextMapPropagator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
TextMapSetter,
TraceFlags,
} from '@opentelemetry/api';
import { TraceState } from '../../trace/TraceState';
import { TraceState } from './TraceState';

export const TRACE_PARENT_HEADER = 'traceparent';
export const TRACE_STATE_HEADER = 'tracestate';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
import {
TRACE_PARENT_HEADER,
TRACE_STATE_HEADER,
} from '../../src/context/propagation/HttpTraceContext';
} from '../../src/trace/HttpTraceContext';
import { TraceState } from '../../src/trace/TraceState';

describe('Composite Propagator', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
HttpTraceContext,
TRACE_PARENT_HEADER,
TRACE_STATE_HEADER,
} from '../../src/context/propagation/HttpTraceContext';
} from '../../src/trace/HttpTraceContext';
import { TraceState } from '../../src/trace/TraceState';

describe('HttpTraceContext', () => {
Expand Down

0 comments on commit 677727b

Please sign in to comment.