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

fix: use renamed TraceContextTextMapPropagator #644

Closed
Closed
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
2 changes: 1 addition & 1 deletion examples/grpc-census-prop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ that is already instrumented using OpenCensus.
If both sides of gRPC communication are using OpenTelemetry instrumentation then
the `propagator-grpc-census-binary` propagator isn't required. Context will be
propagated using the `traceparent` header (thanks to the
[HttpTraceContextPropagator](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-core/src/trace/HttpTraceContextPropagator.ts)
[W3CTraceContextPropagator](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-core/src/trace/W3CTraceContextPropagator.ts)
propagator from opentelemetry-core). If there is a mix of OpenCensus and OpenTelemetry
instrumentation then the `propagator-grpc-census-binary` propagator allows OpenTelemetry
to propagate context through the `grpc-trace-bin` binary header.
Expand Down
4 changes: 2 additions & 2 deletions examples/grpc-census-prop/tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const opentelemetry = require('@opentelemetry/api');
const { NodeTracerProvider } = require('@opentelemetry/node');
const { SimpleSpanProcessor, ConsoleSpanExporter } = require('@opentelemetry/tracing');
const { HttpTraceContextPropagator } = require('@opentelemetry/core');
const { W3CTraceContextPropagator } = require('@opentelemetry/core');
const { GrpcCensusPropagator } = require('@opentelemetry/propagator-grpc-census-binary');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { GrpcInstrumentation } = require('@opentelemetry/instrumentation-grpc');
Expand All @@ -26,7 +26,7 @@ module.exports = (serviceName, binaryPropagator) => {
});
} else {
provider.register({
propagator: new HttpTraceContextPropagator(),
propagator: new W3CTraceContextPropagator(),
});
}

Expand Down
4 changes: 2 additions & 2 deletions examples/web/examples/document-load/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xm
import { ZoneContextManager } from '@opentelemetry/context-zone';
import { CollectorTraceExporter } from '@opentelemetry/exporter-collector';
import { B3Propagator } from '@opentelemetry/propagator-b3';
import { CompositePropagator, HttpTraceContextPropagator } from '@opentelemetry/core';
import { CompositePropagator, W3CTraceContextPropagator } from '@opentelemetry/core';
import { registerInstrumentations } from '@opentelemetry/instrumentation';

const provider = new WebTracerProvider();
Expand All @@ -18,7 +18,7 @@ provider.register({
propagator: new CompositePropagator({
propagators: [
new B3Propagator(),
new HttpTraceContextPropagator(),
new W3CTraceContextPropagator(),
],
}),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import {
TextMapPropagator,
} from '@opentelemetry/api';
import { AWSXRayPropagator } from '@opentelemetry/propagator-aws-xray';
import { HttpTraceContextPropagator } from '@opentelemetry/core';
import { W3CTraceContextPropagator } from '@opentelemetry/core';

const memoryExporter = new InMemorySpanExporter();
const provider = new NodeTracerProvider();
Expand Down Expand Up @@ -143,7 +143,7 @@ describe('lambda handler', () => {
};
const sampledHttpHeader = serializeSpanContext(
sampledHttpSpanContext,
new HttpTraceContextPropagator()
new W3CTraceContextPropagator()
);

const unsampledAwsSpanContext: SpanContext = {
Expand All @@ -165,7 +165,7 @@ describe('lambda handler', () => {
};
const unsampledHttpHeader = serializeSpanContext(
unsampledHttpSpanContext,
new HttpTraceContextPropagator()
new W3CTraceContextPropagator()
);

const sampledGenericSpanContext: SpanContext = {
Expand All @@ -176,7 +176,7 @@ describe('lambda handler', () => {
};
const sampledGenericSpan = serializeSpanContext(
sampledGenericSpanContext,
new HttpTraceContextPropagator()
new W3CTraceContextPropagator()
);

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { DocumentLoadInstrumentation } from '@opentelemetry/instrumentation-docu
import { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request';
import { registerInstrumentations } from '@opentelemetry/instrumentation';
import { B3Propagator } from '@opentelemetry/propagator-b3';
import { CompositePropagator, HttpTraceContextPropagator } from '@opentelemetry/core';
import { CompositePropagator, W3CTraceContextPropagator } from '@opentelemetry/core';

const provider = new WebTracerProvider();

Expand All @@ -32,7 +32,7 @@ provider.register({
propagator: new CompositePropagator({
propagators: [
new B3Propagator(),
new HttpTraceContextPropagator(),
new W3CTraceContextPropagator(),
],
}),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
SpanAttributes,
} from '@opentelemetry/api';
import {
HttpTraceContextPropagator,
W3CTraceContextPropagator,
TRACE_PARENT_HEADER,
} from '@opentelemetry/core';
import {
Expand Down Expand Up @@ -248,7 +248,7 @@ describe('DocumentLoad Instrumentation', () => {
});

before(() => {
propagation.setGlobalPropagator(new HttpTraceContextPropagator());
propagation.setGlobalPropagator(new W3CTraceContextPropagator());
});

describe('constructor', () => {
Expand Down
2 changes: 1 addition & 1 deletion propagators/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### Built-in Propagators

OpenTelemetry core package provides many Built-in Propagators such as HttpTraceContextPropagator Propagator, B3 Propagator, Composite Propagator etc.
OpenTelemetry core package provides many Built-in Propagators such as W3CTraceContextPropagator Propagator, B3 Propagator, Composite Propagator etc.

[Click here](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core#built-in-propagators) to see Built-in Propagators.

Expand Down