Skip to content

Commit

Permalink
Inconsistent Sampling Result Names (#938)
Browse files Browse the repository at this point in the history
* Inconsistent SamplingDecision Names

- `NOT_RECORD`
- `RECORD`
- `RECORD_AND_SAMPLED`

Seems like we should pick between present tense or past tense and make it consistent. I am proposing that we use past tense as in it's a decision that has already been made. `NOT_RECORDED`, `RECORDED`, `RECORDED_AND_SAMPLED`.

`NOT_RECORD` doesn't make sense. It is not correct English.

* Use imperative names for sampling result
  • Loading branch information
ejsmith authored Sep 15, 2020
1 parent 9a80324 commit 4cfcb4d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions specification/trace/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ Returns the sampling Decision for a `Span` to be created.
It produces an output called `SamplingResult` which contains:

* A sampling `Decision`. One of the following enum values:
* `NOT_RECORD` - `IsRecording() == false`, span will not be recorded and all events and attributes
* `IGNORE` - `IsRecording() == false`, span will not be recorded and all events and attributes
will be dropped.
* `RECORD` - `IsRecording() == true`, but `Sampled` flag MUST NOT be set.
* `RECORD_AND_SAMPLED` - `IsRecording() == true` AND `Sampled` flag` MUST be set.
* `RECORD_ONLY` - `IsRecording() == true`, but `Sampled` flag MUST NOT be set.
* `RECORD_AND_SAMPLE` - `IsRecording() == true` AND `Sampled` flag` MUST be set.
* A set of span Attributes that will also be added to the `Span`. The returned
object must be immutable (multiple calls may return different immutable objects).

Expand All @@ -115,12 +115,12 @@ The default sampler is `ParentBased(root=AlwaysOn)`.

#### AlwaysOn

* Returns `RECORD_AND_SAMPLED` always.
* Returns `RECORD_AND_SAMPLE` always.
* Description MUST be `AlwaysOnSampler`.

#### AlwaysOff

* Returns `NOT_RECORD` always.
* Returns `IGNORE` always.
* Description MUST be `AlwaysOffSampler`.

#### TraceIdRatioBased
Expand Down

0 comments on commit 4cfcb4d

Please sign in to comment.