Skip to content

Commit 558d3ea

Browse files
committed
docs: document CorrelationContext propagator under Built-in Implementations section
Signed-off-by: Ruben Vargas <[email protected]>
1 parent f978377 commit 558d3ea

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/opentelemetry-core/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ const { CompositePropagator } = require("@opentelemetry/core");
5555
api.propagation.setGlobalPropagator(new CompositePropagator());
5656
```
5757

58+
#### Correlation Context Propagator
59+
Provides a text-based approach to propagate [correlational context](https://w3c.github.io/correlation-context/) to remote services using the [OpenTelemetry CorrelationContext Propagation](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/correlationcontext/api.md#header-name) HTTP headers.
60+
61+
```js
62+
const api = require("@opentelemetry/api");
63+
const { HttpCorrelationContext } = require("@opentelemetry/core");
64+
65+
/* Set Global Propagator */
66+
api.propagation.setGlobalPropagator(new HttpCorrelationContext());
67+
```
68+
5869
### Built-in Sampler
5970
Sampler is used to make decisions on `Span` sampling.
6071

0 commit comments

Comments
 (0)