Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 1bc4ad4

Browse files
author
Emmanuel T Odeke
authored
Tweak the trace sampling decision docs (#28)
1 parent ad4d0c8 commit 1bc4ad4

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

trace/Sampling.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
# Sampling
22

3-
This document is about the sampling bit, sampling decision, samplers and how and when does
4-
OpenCensus sample traces. A sampled traces is a traces that gets exported via the configured
3+
This document is about the sampling bit, sampling decision, samplers and how and when
4+
OpenCensus samples traces. A sampled trace is one that gets exported via the configured
55
exporters.
66

77
## Sampling Bit (propagated via TraceOptions)
88

9-
Sampling bit is always set only at the start of a Span, and is using a `Sampler`
9+
The Sampling bit is always set only at the start of a Span, using a `Sampler`
1010

1111
### What kind of samplers does OpenCensus support?
12-
* `AlwaysSample` - sampler that always makes a "yes" decision every time.
13-
* `NeverSample` - sampler that always makes a "no" decision every time.
12+
* `AlwaysSample` - sampler that makes a "yes" decision every time.
13+
* `NeverSample` - sampler that makes a "no" decision every time.
1414
* `Probability` - sampler that tries to uniformly sample traces with a given probability. When
15-
applied to a child `Span` of a **sampled** parent `Span` then it keeps the sampling decision.
15+
applied to a child `Span` of a **sampled** parent `Span`, the child `Span` keeps the sampling decision.
1616

1717
### How can users control the Sampler that is used for sampling?
18-
There are 2 ways to control the `Sampler` used when the library does sampling:
18+
There are 2 ways to control the `Sampler` used when the library samples:
1919
* Controlling the global default `Sampler` via [TraceConfig](https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/TraceConfig.md).
20-
* Pass a specific `Sampler` when start the [Span](https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/Span.md)
20+
* Pass a specific `Sampler` when starting the [Span](https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/Span.md)
2121
(a.k.a. "span-scoped").
2222
* For example `AlwaysSample` and `NeverSample` can be used to implement request-specific
2323
decisions such as those based on http paths.
2424

2525
### When does OpenCensus sample traces?
26-
The OpenCensus library does sampling based on the following rules:
27-
1. If the span is a root `Span` then a `Sampler` will be used to make the sampling decision:
26+
The OpenCensus library samples based on the following rules:
27+
1. If the span is a root `Span`, then a `Sampler` will be used to make the sampling decision:
2828
* If a "span-scoped" `Sampler` is provided, use it to determine the sampling decision.
2929
* Else use the global default `Sampler` to determine the sampling decision.
3030
2. If the span is a child of a remote `Span` the sampling decision will be:
3131
* If a "span-scoped" `Sampler` is provided, use it to determine the sampling decision.
3232
* Else use the global default `Sampler` to determine the sampling decision.
33-
2. If the span is a child of a local `Span` the sampling decision will be:
33+
3. If the span is a child of a local `Span` the sampling decision will be:
3434
* If a "span-scoped" `Sampler` is provided, use it to determine the sampling decision.
35-
* Else keep the sampling from the parent.
35+
* Else keep the sampling decision from the parent.

0 commit comments

Comments
 (0)