Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Add trace head-sampling #583

Merged
merged 3 commits into from
Jun 19, 2019

Conversation

pjanotti
Copy link

This is to complete the sampling feature since OC Service already offers tail-sampling. This is implemented using an extra hashing as an attempt to avoid bias from trace ID generation and also to correctly spread traces for backends that also do hashing.

@pjanotti pjanotti requested a review from a team as a code owner June 18, 2019 16:39
@pjanotti pjanotti self-assigned this Jun 18, 2019
This is to complete the sampling feature since OC Service already offers tail-sampling. This is implemented using an extra hashing as an attempt to avoid bias from trace ID generation and also to correctly spread traces for backends that also do hashing.

Tests to enforce hash of different lengths.

Make hashing seed configurable
@codecov
Copy link

codecov bot commented Jun 18, 2019

Codecov Report

Merging #583 into master will increase coverage by 0.44%.
The diff coverage is 92.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #583      +/-   ##
==========================================
+ Coverage   65.97%   66.41%   +0.44%     
==========================================
  Files          85       86       +1     
  Lines        5428     5518      +90     
==========================================
+ Hits         3581     3665      +84     
- Misses       1641     1645       +4     
- Partials      206      208       +2
Impacted Files Coverage Δ
cmd/occollector/app/builder/sampling_builder.go 76.08% <ø> (ø) ⬆️
...sor/tracesamplerprocessor/tracesamplerprocessor.go 100% <100%> (ø)
cmd/occollector/app/collector/processors.go 20.79% <63.15%> (+3.96%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 610d5f6...37ff6c2. Read the comment docs.

@flands flands added this to the 0.1.9 milestone Jun 18, 2019
@pjanotti pjanotti merged commit dee9655 into census-instrumentation:master Jun 19, 2019
@pjanotti pjanotti deleted the head-sampling branch June 19, 2019 00:43
pjanotti pushed a commit to pjanotti/opentelemetry-service that referenced this pull request Jun 19, 2019
Cherry-picking census-instrumentation/opencensus-service#583 from OC.

* Add trace head-sampling

This is to complete the sampling feature since OC Service already offers tail-sampling. This is implemented using an extra hashing as an attempt to avoid bias from trace ID generation and also to correctly spread traces for backends that also do hashing.

Tests to enforce hash of different lengths.

Make hashing seed configurable

* Direct recommendation about hash seeding setting

* More precise wording for hash-seed comment
pjanotti pushed a commit to open-telemetry/opentelemetry-collector that referenced this pull request Jun 19, 2019
Cherry-picking census-instrumentation/opencensus-service#583 from OC.

* Add trace head-sampling

This is to complete the sampling feature since OC Service already offers tail-sampling. This is implemented using an extra hashing as an attempt to avoid bias from trace ID generation and also to correctly spread traces for backends that also do hashing.

Tests to enforce hash of different lengths.

Make hashing seed configurable

* Direct recommendation about hash seeding setting

* More precise wording for hash-seed comment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants