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

docs: document CorrelationContext propagator under Built-in Implement… #1080

Merged
merged 2 commits into from
May 19, 2020
Merged
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
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
mayurkale22 marked this conversation as resolved.
Show resolved Hide resolved
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