-
Notifications
You must be signed in to change notification settings - Fork 45
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
First draft to support stacked listeners #59
Conversation
e6ef523
to
e4c3152
Compare
8606d60
to
d5c4484
Compare
@@ -0,0 +1,23 @@ | |||
package org.zalando.tracer; | |||
|
|||
import org.zalando.tracer.TracerFactory.Builder; |
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.
unused import?
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.
It's used as a link in the javadoc comment
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.
Ah ok. I didn't check that.. :)
|
||
/** | ||
* {@link StackedTraceListener} are a special kind of {@link TraceListener}, because they are aware of | ||
* {@link Builder#stacked() trace stacking}. A stacked trace will, in contract to {@link TraceListener}, be observed |
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.
typo: in contrast to
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.
Fixed
this.listeners = listeners; | ||
|
||
final Map<Boolean, List<TraceListener>> partitions = listeners.stream() | ||
.collect(partitioningBy(StackedTraceListener.class::isInstance)); |
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.
You sir are crazy :D
Nice.
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 how partitioningBy
is meant to be used, imho.
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.
Its awesome. I really like it :)
Looks good to me :) |
👍 |
Fixes #56