Skip to content

Change the default sampler to ParentOrElse(AlwaysOn) #750

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

Merged
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions specification/trace/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The SDK defines the interface [`Sampler`](#sampler) as well as a set of

### Sampler

`Sampler` interface allows to create custom samplers which will return a
`Sampler` interface allows users to create custom samplers which will return a
sampling `SamplingResult` based on information that is typically available just
before the `Span` was created.

Expand Down Expand Up @@ -94,6 +94,8 @@ be displayed on debug pages or in the logs. Example:
Description MUST NOT change over time and caller can cache the returned value.

### Built-in samplers
OpenTelemetry supports a number of built-in samplers to choose from.
The default sampler if one is not specified is `ParentOrElse(AlwaysOn)`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The default sampler if one is not specified is `ParentOrElse(AlwaysOn)`.
The default sampler if is `ParentOrElse(AlwaysOn)`.


#### AlwaysOn

Expand Down Expand Up @@ -121,7 +123,6 @@ of the `TraceID`.
* If parent's `SampledFlag` is set to `true` returns `RECORD_AND_SAMPLED`
* If parent's `SampledFlag` is set to `false` returns `NOT_RECORD`
* If no parent (root span) exists returns the result of the `delegateSampler`.
* `ParentOrElse(AlwaysOn)` is the default sampler.
* Description MUST be `ParentOrElse{delegateSampler.getDescription()}`.

|Parent|`ParentOrElse(delegateSampler)`
Expand Down