-
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
Added tracegen utility #956
Added tracegen utility #956
Conversation
@yurishkuro could you take a look at this? The one notable missing thing is the client metrics. I also wanted to check if the inject/extract part looks sane, as I couldn't really get why the original tracegen is doing that. |
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.
iirc @tigrannajaryan had another load generator that he used for benchmarking OTLP
tracegen/internal/tracegen/config.go
Outdated
@@ -0,0 +1,86 @@ | |||
// Copyright (c) 2018 The Jaeger Authors. |
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.
since this is not the code from Jaeger verbatim, a better copyright reference is
// Copyright (c) 2020 The OpenTelemetry Authors.
// Copyright (c) 2018 The Jaeger Authors.
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.
This is currently under discussion here open-telemetry/community#475
} | ||
|
||
wg := sync.WaitGroup{} | ||
var running uint32 = 1 |
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.
this one is never used to signal the workers to stop
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.
Isn't it used a few lines below?
if c.Duration > 0 {
time.Sleep(c.Duration)
atomic.StoreUint32(&running, 0)
}
Thanks @yurishkuro @jpkrohling Here is the generator I used in the OTLP benchmarks, it is a primitive one: https://github.com/tigrannajaryan/exp-otelproto/blob/master/encodings/otlp/generator.go @jpkrohling we also have a more sophisticated Span data generator in https://github.com/open-telemetry/opentelemetry-collector/blob/master/internal/goldendataset/span_generator.go Depending on what sort of spans you are looking for this one may be a better choice since it can generate a variety of data which is good for testing (but it may also be slower to generate data - not sure by how much). |
I'm looking primarily to having a tool that is able to generate a specific number of traces with predictable outcome. This tool, ideally a binary packaged in a container, would be used by e2e tests to assert that the whole system is working properly. Load testing would be a secondary goal. |
Are we talking about some other e2e tests that are different from e2e tests that we already have in this repo? |
Potentially, yes. For the Jaeger Operator, we have a different set of e2e tests, especially for the case where we inject a sidecar into a "business application". The same would happen for OpenTelemetry Operator, and the e2e test would make sure that everything is in the right place and the networking is properly configured. The actual business application is irrelevant, hence, something simple like the tracegen. |
For clarity: this first iteration of the tracegen would not be used for the case I mentioned above, but I do plan on adding a web interface to it. |
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.
Blocking until license/copyright issue is clarified.
tracegen/internal/tracegen/config.go
Outdated
@@ -0,0 +1,86 @@ | |||
// Copyright (c) 2018 The Jaeger Authors. |
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.
This is currently under discussion here open-telemetry/community#475
Once the copyright part is figured out, I'll address most of the review comments. |
Copyright is clarified, we can move forward. |
3981314
to
bed0ea2
Compare
PR updated |
CI is failing due to flaky tests. |
@jpkrohling please fix CHANGELOG.md conflict. Can you also add some tests for the new code? |
Codecov Report
@@ Coverage Diff @@
## master #956 +/- ##
==========================================
+ Coverage 87.97% 88.85% +0.87%
==========================================
Files 251 254 +3
Lines 12012 12150 +138
==========================================
+ Hits 10568 10796 +228
+ Misses 1109 1006 -103
- Partials 335 348 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
bed0ea2
to
6a1a481
Compare
Conflict solved, test added. |
* Consolidate stdout exporter * Move config to own file and match project standard * Abstract Exporter into unified struct * Rename trace part of the exporter * Update import paths and configuration * Update tests * Update InstallNewPipeline to not return traceProvider It is a registered global, access it that way. * Update example_test * Update docs * Update example to be for whole package * Update metric output Closer match the span output. * Clean up span output Print as a batch and cleanup marshaling. * Correct spelling error in doc * Add Exporters README * Update Changelog * Propagate changes to rest of project * Lint fixes * Fix example test in metric SDK * Add disable config options for trace and metric Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
* [instrumentation/wsgi] fix NonRecordingSpan bug There was a bug caused by accessing `.kind` on a NonRecordingSpan. Added a test to validate the fix. Fix #956 * fix lint * use is_recording * fix lint * fix lint * fix lint
Signed-off-by: Juraci Paixão Kröhling juraci@kroehling.de
Description: Added
tracegen
Link to tracking Issue: #955
Testing: Manual tests
Documentation: readme included