-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 tracegen utility for generating traces #1245
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1245 +/- ##
======================================
Coverage 100% 100%
======================================
Files 161 161
Lines 7198 7198
======================================
Hits 7198 7198 Continue to review full report at Codecov.
|
internal/tracegen/config.go
Outdated
fs.IntVar(&c.Workers, "workers", 1, "Number of workers (goroutines) to run") | ||
fs.IntVar(&c.Traces, "traces", 1, "Number of traces to generate in each worker (ignored if duration is provided") | ||
fs.BoolVar(&c.Marshall, "marshall", false, "Whether to marshall trace context via HTTP headers") | ||
fs.BoolVar(&c.Debug, "debug", false, "Whether to set DEBUG flag on the spans to prevent downsampling") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
downsampling is not a thing in OSS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps "force sampling" makes more sense?
internal/tracegen/worker.go
Outdated
child.Finish() | ||
sp.Finish() | ||
} else { | ||
opt := opentracing.FinishOptions{FinishTime: time.Now().Add(123 * time.Microsecond)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the magic number?
internal/tracegen/worker.go
Outdated
type worker struct { | ||
id int // worker id | ||
traces int // how many traces the worker has to generate (only when duration==0) | ||
marshall bool // whether the worker needs to marshall trace context via HTTP headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why this is necessary for a tracegen tool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW marshall is used in various places in Jaeger code and I believe it is a typo. Marshal is the correct spelling AFAIK.
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
a7ca9ed
to
d083c35
Compare
@@ -0,0 +1 @@ | |||
Test utility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per offline discussion, this is worth merging even though it doesn't have tests (it is itself a test utility).
Signed-off-by: Yuri Shkuro <[email protected]>
Small utility used to generate continuous stream of simple spans, useful for stress testing.