почему сервисы не показываются в зипкине? - PullRequest
0 голосов
/ 18 сентября 2018
  • Я использую Spring boot: 1.5.16
  • Spring cloud: Edgware.RELEASE
  • Java: 1.8

Мой сэмплер выглядит так:

 @Bean
    public Sampler sampler(){
        return new AlwaysSampler();
 }

В Эврике все выглядит хорошо: enter image description here

Но мойпроблема в том, что в Зипкине я вообще не вижу услуг.enter image description here

Я нашел только журналы отладки, ошибок нет:

2018-09-18 05:15:53.831 DEBUG [reservation-client,,,] 3759 --- [io-9999-exec-10] o.s.c.sleuth.instrument.web.TraceFilter  : Received a request to uri [/reservations] that should not be sampled [false]
2018-09-18 05:15:53.832 DEBUG [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] o.s.c.sleuth.instrument.web.TraceFilter  : No parent span present - creating a new span
2018-09-18 05:15:53.832 DEBUG [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.web.TraceHandlerInterceptor    : Handling span [Trace: 950c6b586ebb2d56, Span: 950c6b586ebb2d56, Parent: null, exportable:true]
2018-09-18 05:15:53.832 DEBUG [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.web.TraceHandlerInterceptor    : Adding a method tag with value [writeReservation] to a span [Trace: 950c6b586ebb2d56, Span: 950c6b586ebb2d56, Parent: null, exportable:true]
2018-09-18 05:15:53.832 DEBUG [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.web.TraceHandlerInterceptor    : Adding a class tag with value [ReservationApiGatewayRestController] to a span [Trace: 950c6b586ebb2d56, Span: 950c6b586ebb2d56, Parent: null, exportable:true]
2018-09-18 05:15:53.833  INFO [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] .e.r.ReservationApiGatewayRestController : VQ start sending!!!
2018-09-18 05:15:53.833 DEBUG [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.m.TraceChannelInterceptor      : Processing message before sending it to the channel
2018-09-18 05:15:53.833 DEBUG [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.m.TraceChannelInterceptor      : Parent span is [Trace: 950c6b586ebb2d56, Span: 950c6b586ebb2d56, Parent: null, exportable:true]
2018-09-18 05:15:53.833 DEBUG [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.m.TraceChannelInterceptor      : Name of the span will be [message:output]
2018-09-18 05:15:53.833 DEBUG [reservation-client,950c6b586ebb2d56,74b3c2b9366ff711,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.m.TraceChannelInterceptor      : Marking span with client send
2018-09-18 05:15:53.833 DEBUG [reservation-client,950c6b586ebb2d56,74b3c2b9366ff711,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.m.TraceChannelInterceptor      : Completed sending and current span is [Trace: 950c6b586ebb2d56, Span: 74b3c2b9366ff711, Parent: 950c6b586ebb2d56, exportable:true]
2018-09-18 05:15:53.833 DEBUG [reservation-client,950c6b586ebb2d56,74b3c2b9366ff711,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.m.TraceChannelInterceptor      : Marking span with client received
2018-09-18 05:15:53.833 DEBUG [reservation-client,950c6b586ebb2d56,74b3c2b9366ff711,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.m.TraceChannelInterceptor      : Closing messaging span [Trace: 950c6b586ebb2d56, Span: 74b3c2b9366ff711, Parent: 950c6b586ebb2d56, exportable:true]
2018-09-18 05:15:53.833 DEBUG [reservation-client,950c6b586ebb2d56,74b3c2b9366ff711,true] 3759 --- [io-9999-exec-10] o.s.c.s.zipkin2.DefaultEndpointLocator   : Span will contain serviceName [reservation-client]
2018-09-18 05:15:53.834 DEBUG [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] o.s.c.s.i.m.TraceChannelInterceptor      : Messaging span [Trace: 950c6b586ebb2d56, Span: 74b3c2b9366ff711, Parent: 950c6b586ebb2d56, exportable:true] successfully closed
2018-09-18 05:15:53.834 DEBUG [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] o.s.c.sleuth.instrument.web.TraceFilter  : Closing the span [Trace: 950c6b586ebb2d56, Span: 950c6b586ebb2d56, Parent: null, exportable:true] since the response was successful
2018-09-18 05:15:53.834 DEBUG [reservation-client,950c6b586ebb2d56,950c6b586ebb2d56,true] 3759 --- [io-9999-exec-10] o.s.c.s.zipkin2.DefaultEndpointLocator   : Span will contain serviceName 

Вопрос прост.Почему я ничего не вижу в Zipkin?Эти образцы написаны Джош Лонг.

1 Ответ

0 голосов
/ 10 октября 2018

Проверьте файл конфигурации и убедитесь, что baseUrl задан правильно здесь

    spring.zipkin.baseUrl
...