Apache kafka 春云侦探与齐普金与卡夫卡
我在用spring cloud的侦探和zipkin以及kafka。 这是我的pom.xml配置Apache kafka 春云侦探与齐普金与卡夫卡,apache-kafka,spring-cloud,spring-cloud-stream,zipkin,spring-cloud-sleuth,Apache Kafka,Spring Cloud,Spring Cloud Stream,Zipkin,Spring Cloud Sleuth,我在用spring cloud的侦探和zipkin以及kafka。 这是我的pom.xml配置 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zipkin</artifactId> <version>2.0.0.RC1</vers
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
<version>2.0.0.RC1</version>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
然后,我启动SpringBoot应用程序,尝试通过浏览器访问,但我找不到SpringCloudSendSleuth to kafka。因此,我尝试调试zipkin2.reporter.AsyncReporter,并发现每当[flush]方法返回第265行时,即“if(!bundler.isReady()&&!closed.get())返回”,代码如下所示
void flush(BufferNextMessage<S> bundler) {
if (closed.get()) throw new IllegalStateException("closed");
pending.drainTo(bundler, bundler.remainingNanos());
// record after flushing reduces the amount of gauge events vs on doing this on report
metrics.updateQueuedSpans(pending.count);
metrics.updateQueuedBytes(pending.sizeInBytes);
// loop around if we are running, and the bundle isn't full
// if we are closed, try to send what's pending
if (!bundler.isReady() && !closed.get()) return;
// Signal that we are about to send a message of a known size in bytes
metrics.incrementMessages();
metrics.incrementMessageBytes(bundler.sizeInBytes());
void flush(BufferNextMessage绑定器){
如果(closed.get())抛出新的非法状态异常(“closed”);
pending.drainTo(bundler,bundler.remainingNanos());
//与在报告中执行此操作相比,冲洗后记录减少了仪表事件的数量
metrics.updateQueuedSpans(pending.count);
metrics.UpdateQueueBytes(挂起的.sizeInBytes);
//如果我们正在运行,并且捆绑包未满,请循环
//如果我们已关闭,请尝试发送待处理的内容
如果(!bundler.isReady()&&!closed.get())返回;
//表示我们将要发送已知大小的消息(以字节为单位)
metrics.incrementMessages();
incrementMessageBytes(bundler.sizeInBytes());
我知道这意味着bufferFull为false。但为什么每次都不是bufferFull,即使我经常调用URL
感谢您的关注。请使用
Finchley.RELEASE
并设置spring.zipkin.sender.type:kafka
谢谢您的建议。但是没有更改。您的yaml看起来格式不正确
void flush(BufferNextMessage<S> bundler) {
if (closed.get()) throw new IllegalStateException("closed");
pending.drainTo(bundler, bundler.remainingNanos());
// record after flushing reduces the amount of gauge events vs on doing this on report
metrics.updateQueuedSpans(pending.count);
metrics.updateQueuedBytes(pending.sizeInBytes);
// loop around if we are running, and the bundle isn't full
// if we are closed, try to send what's pending
if (!bundler.isReady() && !closed.get()) return;
// Signal that we are about to send a message of a known size in bytes
metrics.incrementMessages();
metrics.incrementMessageBytes(bundler.sizeInBytes());