У меня есть клиентское приложение, оснащенное библиотекой Zipkin с конфигурацией в весеннем 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 регистрируется, но они не собираются на сервере apm hawkular.
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 открывается правильно.
Насколько я понимаю, клиент Zipkin может быть интегрирован с Hawkular apmпростой заменой hawkular url вместо zipkin-сервера, но, похоже, это не сработает.
Никаких предложений по этому поводу, к сожалению, я тоже не смог найти ни одного примера.