Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Threshold propagation in trace state #235

Merged
merged 39 commits into from
Jan 30, 2024
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3502d8b
First draft of threshold propagation proposal
kentquirk Aug 9, 2023
0369c35
Respond to feedback.
kentquirk Aug 31, 2023
8c84f4d
appease linter
kentquirk Aug 31, 2023
e8e0496
One more linty list
kentquirk Aug 31, 2023
23b0bea
Respond to feedback
kentquirk Sep 6, 2023
6866873
Remove embedded question.
kentquirk Sep 6, 2023
f3fc7c2
sampled flag
kentquirk Sep 6, 2023
5a9e0d9
lint
kentquirk Sep 6, 2023
38654af
More feedback
kentquirk Sep 13, 2023
de457b1
Explain common algorithms
kentquirk Sep 14, 2023
5e43b9b
Incorporate further feedback
kentquirk Sep 28, 2023
ac0b11c
fix lint errors
kentquirk Oct 4, 2023
12aa163
Update with image
kentquirk Oct 4, 2023
4698ae5
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Oct 5, 2023
5ad5630
respond to some feedback
kentquirk Oct 12, 2023
5217916
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Oct 12, 2023
65b9a7b
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Nov 30, 2023
66bc0d2
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Nov 30, 2023
a0b4bf0
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Nov 30, 2023
bbdf1af
Fix adjusted count language
kentquirk Nov 30, 2023
84077b5
Appease the linter
kentquirk Nov 30, 2023
106aa2d
Cmon, lint. Tell me all the problems at once!
kentquirk Nov 30, 2023
9d2c5e9
Try to convert to rejection threshold
kentquirk Jan 11, 2024
fb119a2
Merge branch 'main' into threshold-propagation
kentquirk Jan 11, 2024
e699133
Incorporate Peter's comments
kentquirk Jan 17, 2024
eb55ac5
incorporate Peter's comments
kentquirk Jan 17, 2024
56094a0
explain rejection threshold
kentquirk Jan 17, 2024
a4fb718
linters, amirite?
kentquirk Jan 17, 2024
e3367ac
Update graphic
kentquirk Jan 17, 2024
8504a99
Remove extra paren
kentquirk Jan 18, 2024
108bca5
update graphic to Josh's latest
kentquirk Jan 19, 2024
50d105f
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Jan 25, 2024
4d262b4
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Jan 25, 2024
91af1f4
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Jan 25, 2024
29e322b
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Jan 25, 2024
dcda3c1
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Jan 25, 2024
e790133
respond to feedback
kentquirk Jan 25, 2024
88bcd53
Update text/trace/0235-sampling-threshold-in-trace-state.md
kentquirk Jan 25, 2024
053df85
Merge branch 'main' into threshold-propagation
kentquirk Jan 30, 2024
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
Prev Previous commit
Next Next commit
Fix adjusted count language
  • Loading branch information
kentquirk committed Nov 30, 2023
commit bbdf1af88f873ec72f0c91b60d2f7ffa78fc6bcc
6 changes: 1 addition & 5 deletions text/trace/0235-sampling-threshold-in-trace-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,7 @@ prob = float(threshold) / maxth

### Converting threshold to an adjusted count (sampling rate)

The adjusted count is an integer value, indicating the approximate quantity of items from the population that this sample represents. It is 1/probability, [rounded half-up](https://en.wikipedia.org/wiki/Rounding#Rounding_half_up) to the nearest integer. It is not defined for spans that were obtained via non-probabilistic sampling (a sampled span with integer threshold = 0).

```py
maxth = 0x100_0000_0000_0000 # 2^56
adjcount = math.floor((maxth / float(threshold)) + 0.5)
The adjusted count indicates the approximate quantity of items from the population that this sample represents. It is equal to `1/probability`. It is not defined for spans that were obtained via non-probabilistic sampling (a sampled span with integer threshold = 0).

## Trade-offs and mitigations

Expand Down