Questions tagged [spring-cloud-sleuth]

Spring Cloud Sleuth implements a distributed tracing solution for Spring Cloud, borrowing heavily from Dapper, Zipkin and HTrace.

For most users, Sleuth should be invisible, and all your interactions with external systems should be instrumented automatically. You can capture data simply in logs, or by sending it to a remote collector service.

A Span is the basic unit of work. For example, sending RPC is a new span, as is sending a response to an RPC. Span’s are identified by a unique 64-bit ID for the span and another 64-bit ID for the trace the span is a part of. Spans also have other data, such as descriptions, key-value annotations, the ID of the span that caused them, and process ID’s (normally IP address). Spans are started and stopped, and they keep track of their timing information. Once you create a span, you must stop it at some point in the future. A set of spans forming a tree-like structure called a Trace. For example, if you are running a distributed big-data store, a trace might be formed by a put request.

Spring Cloud Sleuth features:

  • Adds trace and span ids to the Slf4J MDC, so you can extract all the logs from a given trace or span in a log aggregator.

  • Provides an abstraction over common distributed tracing data models: traces, spans (forming a DAG), annotations, key-value annotations. Loosely based on HTrace, but Zipkin (Dapper) compatible.

  • Instruments common ingress and egress points from Spring applications (servlet filter, rest template, scheduled actions, message channels, zuul filters, feign client).

  • If spring-cloud-sleuth-zipkin is available then the app will generate and collect Zipkin-compatible traces via HTTP. By default, it sends them to a Zipkin collector service on localhost (port 9411). Configure the location of the service using spring.zipkin.baseUrl.

638 questions
0
votes
1 answer

Sleuth in Apache camel

Hi I am new to Apache Camel, but in my application our team implemented this in so many places. Now we are migrating existing came implemented application to Micro services, here we are not finding any option to implement Spring cloud Sleuth with…
Mahesh
  • 31
  • 5
0
votes
2 answers

spring cloud sleuth cannot geerate spanID

it is necessary to generate a span-id for all that gets into the console log, but unfortunately the span-id is not generated: 2019-03-13 12:35:27.116 INFO [core.data,,,] 13304 --- [ main] s.c.a.AnnotationConfigApplicationContext :…
0
votes
1 answer

Not able to close span in multi thread environment

I want to pass the span across multiple threads and want to get trace. I have different worker threads. while running I am getting You may have forgotten to close or detach null pom.xml
0
votes
1 answer

Unable to bind a Zipkin enum in Spring Boot 2

I am upgrading an application to Spring Boot 2.1.3 (from 1.5.x), and I am facing an issue at startup time. Below block can't be bound properly : spring: zipkin: enabled: true base-url: http://myZipkinServer sender: …
Vincent F
  • 6,523
  • 7
  • 37
  • 79
0
votes
2 answers

Spring Sleuth getting exception for POST requests

Spring Sleuth GET Request is working fine. When trying to integrate with POST request it is failing. 2019-02-14 13:31:11.007 INFO [notification-Service,,,] 4044 --- [io-40303-exec-2] o.s.web.servlet.DispatcherServlet : Completed…
0
votes
1 answer

Sleuth/zipkin with ControllerAdvice is not working

I found there is an old issue Sleuth/Zipkin tracing with @ControllerAdvice, but I meet the same problem with the latest version(spring-cloud-starter-zipkin:2.1.0.RELEASE), I debug it and find that the error is null, so zipkin just guess with…
Jay Fantasy
  • 23
  • 1
  • 4
0
votes
1 answer

Custom spans using annotations

I'm trying out different approaches for microservices tracing (i'm mostly working with event-driven services using RabbitMQ). What I'm testing: spring-cloud-sleuth + zipkin + logstash-reporter elastic-apm-api + elastic-apm-agent +…
ogdabou
  • 582
  • 1
  • 10
  • 41
0
votes
2 answers

send only info level logs to zipkin

In the micro-services based architecture , I have a services which helps me to fetch order details . Internally order details fetches - customer details , delivery details , product details . We have all services developed and the architecture is…
Ashish Shetkar
  • 1,414
  • 2
  • 18
  • 35
0
votes
2 answers

Docker swarm and communication between containers

I have a very big problem I'm struggling with for 3 days. I use docker swarm on the remote server. 20 microservices are in the same network NetA and stack StackA. Now I want to add Zipkin and Sleuth to my microservices to trace all requests. All…
Matley
  • 1,953
  • 4
  • 35
  • 73
0
votes
0 answers

Spring Cloud Sleuth with RabbitTemplate

I have a problem with spring cloud sleuth and rabbitTemplate. When i send post with my service and pulibsh message on rabbitmq using rabbitTemplate, my second service consume the message, but not respect same trace id generate on service 1. Exists…
0
votes
1 answer

Is there a way to provide Slueth the spring application name other than specifying that in bootstrap.properties of Spring boot application?

As per this guidelines, one has to specify application name in bootstrap.properties if using custom logback.xml. I was wondering if there's any way where I can hardcode the application name in logback.xml instead of creating the bootstrap.properties…
0
votes
0 answers

Combining logs from two different servers

I have a distributed process which runs across two different servers (A and B) and I get two different log files A.log and B.log, I need this merged into a single file. I have referred to following links but I am unable to get a merged file from…
sah1
  • 380
  • 1
  • 6
  • 23
0
votes
2 answers

Spring cloud sleuth - Propagation of headers in rest call

We incorporated spring cloud sleuth (1.1.3 RELEASE) in our spring boot 1.x application and had no problems with header propagation over rest. However we upgraded our application to spring boot 2.0.4 and added cloud sleuth 2.0.1 RELEASE. Now, trace…
user10267174
  • 51
  • 2
  • 6
0
votes
0 answers

TraceId is changing in every internal rest call through hystrix command

I am facing the Issue with hystrix command, when my request flow from one service to another the tracIds is changing but it should be same. I have 4 internal service call to get my resource but exceptions is coming, I want to track through traceId…
Ravat Tailor
  • 1,193
  • 3
  • 20
  • 44
0
votes
1 answer

OpenTracing not activating for Sleuth-Zipkin in Spring Boot App

Spring Doc says Spring Cloud Sleuth is compatible with OpenTracing. If you have OpenTracing on the classpath, we automatically register the OpenTracing Tracer bean. If you wish to disable this, set spring.sleuth.opentracing.enabled to false I…