Skip to content
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

Add a Downsampling writer that drop a percentage of spans #1353

Merged
merged 20 commits into from
Mar 12, 2019
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
Prev Previous commit
Next Next commit
updating comment
Signed-off-by: Jude Wang <judew@uber.com>
  • Loading branch information
Jude Wang committed Mar 11, 2019
commit 3392861d508849de427f783caca57772dd6477c0
1 change: 1 addition & 0 deletions storage/spanstore/automate_dropping_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type AutomateDroppingWriter struct {

// NewAutomateDroppingWriter creates a AutomateDroppingWriter
func NewAutomateDroppingWriter(spanWriter Writer, percentage float64) *AutomateDroppingWriter {
// span with TraceID.Low below this threshold won't be written
threshold := uint64(percentage * float64(math.MaxUint64))
return &AutomateDroppingWriter{
spanWriter: spanWriter,
Expand Down