-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add Pulsar collector #3788
base: master
Are you sure you want to change the base?
Add Pulsar collector #3788
Conversation
@reta @codefromthecrypt Excuse me, could you please help with the review when you have a moment, thanks. |
zipkin-collector/pulsar/src/main/java/zipkin2/collector/pulsar/PulsarSpanConsumer.java
Outdated
Show resolved
Hide resolved
zipkin-collector/pulsar/src/main/java/zipkin2/collector/pulsar/LazyPulsarInit.java
Outdated
Show resolved
Hide resolved
zipkin-collector/pulsar/src/main/java/zipkin2/collector/pulsar/LazyPulsarInit.java
Show resolved
Hide resolved
zipkin-collector/pulsar/src/main/java/zipkin2/collector/pulsar/LazyPulsarInit.java
Outdated
Show resolved
Hide resolved
zipkin-collector/pulsar/src/main/java/zipkin2/collector/pulsar/LazyPulsarInit.java
Outdated
Show resolved
Hide resolved
zipkin-collector/pulsar/src/main/java/zipkin2/collector/pulsar/LazyPulsarInit.java
Outdated
Show resolved
Hide resolved
zipkin-collector/pulsar/src/main/java/zipkin2/collector/pulsar/PulsarSpanConsumer.java
Outdated
Show resolved
Hide resolved
zipkin-collector/pulsar/src/main/java/zipkin2/collector/pulsar/PulsarSpanConsumer.java
Outdated
Show resolved
Hide resolved
...-server/src/main/java/zipkin2/server/internal/pulsar/ZipkinPulsarCollectorConfiguration.java
Outdated
Show resolved
Hide resolved
zipkin-server/src/main/java/zipkin2/server/internal/pulsar/ZipkinPulsarCollectorProperties.java
Outdated
Show resolved
Hide resolved
Thanks @CodePrometheus , did first round of review, looks solid! Few comments to look at, thank you |
@reta Thanks for your detailed review. I have made the corresponding fixes. Please feel free to take a look again when you have time. |
.build(); | ||
} catch (Exception e) { | ||
failure.set(CheckResult.failed(e)); | ||
throw new RuntimeException("Pulsar client create failed" + e.getMessage(), e); |
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.
throw new RuntimeException("Pulsar client create failed" + e.getMessage(), e); | |
throw new RuntimeException("Pulsar client creation failed" + e.getMessage(), e); |
// Nobody cares me. | ||
} | ||
failure.set(CheckResult.failed(e)); | ||
throw new RuntimeException("Pulsar unable to subscribe the topic(" + topic + "), please check the pulsar service.", e); |
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.
throw new RuntimeException("Pulsar unable to subscribe the topic(" + topic + "), please check the pulsar service.", e); | |
throw new RuntimeException("Pulsar Client is unable to subscribe to the topic(" + topic + "), please check the service.", e); |
|
||
void close() throws PulsarClientException { | ||
PulsarClient maybe = result; | ||
if (maybe != null) result.close(); |
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.
Should we "release" the result
as well?
result = null;
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.
OK, that's good.
@Override public void close() { | ||
try { | ||
if (consumer != null) { | ||
consumer.close(); |
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.
Sorry, I forgot to add the null
assignment to the consumer:
consumer.close(); | |
consumer.close(); | |
consumer = null; |
Thank you @CodePrometheus , just a few very minor nits but LGTM otherwise, @codefromthecrypt do you have time to take a look? thank you. |
wow! nice to see this coming around. To make sure this is usable, we need to have a sender for it. So, can you make a PR here following the existing conventions? https://github.com/openzipkin/zipkin-reporter-java I'll review more on this PR as I can. |
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 quick request is to pull the docker related parts into a new PR. This will allow us to merge that and reduce a "chicken or the egg" problem, where this PR depends on something published that it also uses. This also detangles reporter for the same reason.
OK, let me remove the docker related changes from this PR, and I'll submit the pulsar related part in |
resolves #2297