-
Notifications
You must be signed in to change notification settings - Fork 821
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
chore: adding force flush to span processors #802
Conversation
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.
LGTM. happy to get rid of some @todo
s
|
||
// does nothing. | ||
onStart(span: Span): void {} | ||
|
||
onEnd(span: Span): void { | ||
if (this._isShutdown) { |
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.
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.
I actually agree. if the span processor shuts down its exporter, then it should be safe for it to continue sending spans even after shutdown and the exporter will just no-op
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.
but this is what spec says for span processors
https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/sdk-tracing.md#shutdown
so they should have the same functionality ?
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.
one additional if
check isn't hurting anything. I would say just leave it in
Please resolve the conflicts. @open-telemetry/javascript-approvers please review this. It is needed for beta. |
Codecov Report
@@ Coverage Diff @@
## master #802 +/- ##
==========================================
+ Coverage 92.54% 94.38% +1.84%
==========================================
Files 245 246 +1
Lines 10712 10837 +125
Branches 1044 1052 +8
==========================================
+ Hits 9913 10229 +316
+ Misses 799 608 -191
|
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.
lgtm
/cc @hekike (original author) FYI |
@@ -45,7 +44,6 @@ export class ZipkinExporter implements SpanExporter { | |||
const urlStr = config.url || ZipkinExporter.DEFAULT_URL; | |||
const urlOpts = url.parse(urlStr); | |||
|
|||
this._forceFlush = config.forceFlush || true; |
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.
I think we should remove _forceFlushOnShutdown
from Jaeger exporter also.
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.
In zipkin this functionality was in fact "dead" but for Jaeger it does something - there is a timeout which waits for the Jaeger to close the sender. Are you ok to make it in separate PR then ?
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.
sure 👍
Which problem is this PR solving?
Short description of the changes