Skip to content

Commit

Permalink
docs: document CorrelationContext propagator under Built-in Implement… (
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvp8510 committed May 19, 2020
1 parent f978377 commit 088921a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/opentelemetry-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This package provides default implementations of the OpenTelemetry API for trace
* [HttpTraceContext Propagator](#httptracecontext-propagator)
* [B3 Propagator](#b3-propagator)
* [Composite Propagator](#composite-propagator)
* [Correlation Context Propagator](#correlation-context-propagator)
- [Built-in Sampler](#built-in-sampler)
* [Always Sampler](#always-sampler)
* [Never Sampler](#never-sampler)
Expand Down Expand Up @@ -55,6 +56,17 @@ const { CompositePropagator } = require("@opentelemetry/core");
api.propagation.setGlobalPropagator(new CompositePropagator());
```

#### Correlation Context Propagator
Provides a text-based approach to propagate [correlation 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.

```js
const api = require("@opentelemetry/api");
const { HttpCorrelationContext } = require("@opentelemetry/core");

/* Set Global Propagator */
api.propagation.setGlobalPropagator(new HttpCorrelationContext());
```

### Built-in Sampler
Sampler is used to make decisions on `Span` sampling.

Expand Down

0 comments on commit 088921a

Please sign in to comment.