Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move tracecontext propagator into trace #2155

Merged
merged 4 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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