-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
JaegerReceiver: Do not try to stop if failed to start. Collector service will do that #1434
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1434 +/- ##
==========================================
- Coverage 90.31% 90.29% -0.03%
==========================================
Files 232 232
Lines 16392 16385 -7
==========================================
- Hits 14805 14795 -10
- Misses 1134 1136 +2
- Partials 453 454 +1
Continue to review full report at Codecov.
|
return jr.stopTraceReceptionLocked() | ||
} | ||
|
||
func (jr *jReceiver) stopTraceReceptionLocked() error { | ||
var err = componenterror.ErrAlreadyStopped | ||
jr.stopOnce.Do(func() { |
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.
Doesn't need to block this PR but Is this stopOnce needed? I believe we decided that collector guarantees Shutdown is only called once. Right now there are a mixture of components with stopOnce so we should probably get rid of all of them if not needed.
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.
Would address in a separate PR.
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.
Given you removed mu
from Shutdown
in this PR, I would recommend removing this from Start
as well (and may as well remove startOnce
/ stopOnce
as well while you're at 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.
Did I? It is just moved the next line.
return jr.stopTraceReceptionLocked() | ||
} | ||
|
||
func (jr *jReceiver) stopTraceReceptionLocked() error { | ||
var err = componenterror.ErrAlreadyStopped | ||
jr.stopOnce.Do(func() { |
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.
Given you removed mu
from Shutdown
in this PR, I would recommend removing this from Start
as well (and may as well remove startOnce
/ stopOnce
as well while you're at it 😄 )
…ice will do that Signed-off-by: Bogdan Drutu <[email protected]>
* Add a Config/Option for histogram * Just one option here * Test fixes * Support and test int64 histograms * Changelog * Lint * Un-export three things.
Fixes #437