Skip to content
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

Merged
merged 3 commits into from
Oct 13, 2016

Conversation

whiskeysierra
Copy link
Contributor

Fixes #56

@@ -0,0 +1,23 @@
package org.zalando.tracer;

import org.zalando.tracer.TracerFactory.Builder;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import?

Copy link
Contributor Author

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

Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: in contrast to

Copy link
Contributor Author

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));
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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 :)

@JonasJurczok
Copy link
Contributor

Looks good to me :)

@JonasJurczok
Copy link
Contributor

JonasJurczok commented Oct 12, 2016

👍

@whiskeysierra whiskeysierra merged commit 33d0f07 into master Oct 13, 2016
@whiskeysierra whiskeysierra deleted the feature/stacked-trace-listener branch October 13, 2016 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants