Zipkin Client不会在Hawkular APM中收到日志

时间:2018-06-01 11:30:22

标签: apache-camel openshift zipkin hawkular distributed-tracing

我的客户端应用程序配有Zipkin库,并在spring application.properties中配置。

camel.zipkin.host-name=hawkular-apm-server.com
camel.zipkin.port=443
camel.zipkin.include-message-body-streams=true

Maven依赖

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-zipkin-starter</artifactId>
    </dependency>

可以从本地计算机访问hawkular apm服务器控制台。

但是,当调用客户端应用程序中暴露的其余api时,会记录zipkin跟踪,但不会在hawkular apm服务器上收集它们。

04:31:55.632 [http-nio-0.0.0.0-8080-exec-1] INFO  o.a.c.c.s.CamelHttpTransportServlet - Initialized CamelHttpTransportServlet[name=CamelServlet, contextPath=]
04:31:55.668 [http-nio-0.0.0.0-8080-exec-1] DEBUG org.apache.camel.zipkin.ZipkinTracer - clientRequest [service=MyCamelClient, traceId=-5541987202080201726, spanId=-5541987202080201726]
04:31:55.672 [http-nio-0.0.0.0-8080-exec-1] DEBUG org.apache.camel.zipkin.ZipkinTracer - serverRequest [service=MyCamel, traceId=-5541987202080201726, spanId=-5541987202080201726]
04:31:55.676 [http-nio-0.0.0.0-8080-exec-1] DEBUG org.apache.camel.zipkin.ZipkinTracer - serverResponse[service=MyCamel, traceId=-5541987202080201726, spanId=-5541987202080201726]
04:31:55.677 [http-nio-0.0.0.0-8080-exec-1] DEBUG org.apache.camel.zipkin.ZipkinTracer - clientResponse[service=MyCamelClient, traceId=-5541987202080201726, spanId=-5541987202080201726]
04:31:55.758 [pool-1-thread-1] WARN  o.a.t.transport.TIOStreamTransport - Error closing output stream.
java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
    at org.apache.thrift.transport.TIOStreamTransport.close(TIOStreamTransport.java:110)
    at org.apache.thrift.transport.TSocket.close(TSocket.java:194)
    at org.apache.thrift.transport.TFramedTransport.close(TFramedTransport.java:89)
    at com.github.kristofa.brave.scribe.ScribeClientProvider.close(ScribeClientProvider.java:96)
    at com.github.kristofa.brave.scribe.ScribeClientProvider.exception(ScribeClientProvider.java:75)
    at com.github.kristofa.brave.scribe.SpanProcessingThread.log(SpanProcessingThread.java:123)
    at com.github.kristofa.brave.scribe.SpanProcessingThread.log(SpanProcessingThread.java:109)
    at com.github.kristofa.brave.scribe.SpanProcessingThread.call(SpanProcessingThread.java:95)
    at com.github.kristofa.brave.scribe.SpanProcessingThread.call(SpanProcessingThread.java:35)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
04:31:55.763 [pool-1-thread-1] WARN  c.g.k.b.scribe.SpanProcessingThread - Logging spans failed. 1 spans are lost!
org.apache.thrift.transport.TTransportException: null
    at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
    at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
    at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129)
    at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
    at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
    at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
    at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
    at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
    at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
    at com.twitter.zipkin.gen.scribe$Client.recv_Log(scribe.java:74)
    at com.twitter.zipkin.gen.scribe$Client.Log(scribe.java:61)
    at com.github.kristofa.brave.scribe.SpanProcessingThread.log(SpanProcessingThread.java:127)
    at com.github.kristofa.brave.scribe.SpanProcessingThread.log(SpanProcessingThread.java:109)
    at com.github.kristofa.brave.scribe.SpanProcessingThread.call(SpanProcessingThread.java:95)
    at com.github.kristofa.brave.scribe.SpanProcessingThread.call(SpanProcessingThread.java:35)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

我不确定客户端应用程序是否存在配置问题,因为Hawkular APM UI正常打开。

根据我的理解,Zipkin客户端可以通过简单替换hawkular url代替zipkin服务器与Hawkular apm集成,但这似乎不起作用。

对此有任何建议,遗憾的是我也找不到任何例子。

0 个答案:

没有答案