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

Spring Sleuth does not populate traceid and spanid to RabbitHandler

We want to use spring sleuth together with spring-amqp (rabbitmq). So we send a message on the publisher site via amqpTemplate.convertAndSend("exchange", "key", myEvent) and expect to have traceid and spanid send along with the rabbit message and…
domi
  • 2,167
  • 1
  • 28
  • 45
0
votes
1 answer

Efficient distributed sequence

I've got a lot of applications, each one have her own log. I'm typically in a distributed logs problematic. To resolve this problematic, I'm using : Brave / Spring Sleuth to generate trace and span ids Elastic/Logstash/Kibana to centralize and…
Akah
  • 1,890
  • 20
  • 28
0
votes
1 answer

Start sleuth tracing at invocation of managed operation

I have a set of microservices but the call chain doesn't start with http. It starts with the invocation of a @ManagedOperation via JMX. The issue with this is that the invocation of this method doesn't start a trace. Anyone know how to start the…
Jesse Nelson
  • 776
  • 8
  • 21
0
votes
1 answer

Zipkin stream server and client configuration where client is using multiple input/output channels

I have a client application with multiple channels as SOURCE/SINK. I want to send logs to Zipkin server. According to my understanding, if spring finds spring cloud stream in classpath, Zipkin client defaults to messaging instead of sending logs…
0
votes
1 answer

Add spring cloud sleuth to Spring application with Jetty server

I am trying to integrate spring cloud sleuth with an existing spring application which uses jetty server. I have added org.springframework.cloud
TT_
  • 385
  • 1
  • 2
  • 14
0
votes
1 answer

Integrating Spring cloud sleuth with Spring project

I am trying to integrate spring cloud sleuth with an existing spring application which uses jetty server. I have added org.springframework.cloud
TT_
  • 385
  • 1
  • 2
  • 14
0
votes
1 answer

Spring Sleuth + Zuul = java.lang.IllegalArgumentException: Malformed id

We are using spring-cloud-sleuth together with spring-cloud-zuul. In above case when HTTP request is forwarded from Spring Zuul to next micro-service X then on X we get following error: java.lang.IllegalArgumentException: Malformed id:…
Ziemowit Stolarczyk
  • 1,014
  • 2
  • 11
  • 26
0
votes
1 answer

specify topic name for sleuth-kaka using spring-cloud-stream

I am trying to set kafka as destination for sleuth reporting. Everything is workign fine except sleuth keeps sending to default topic sleuth. I wanted spans to be send to customized topic such as test as below Below as my configuration for kafka…
Joey Trang
  • 1,105
  • 2
  • 23
  • 44
0
votes
1 answer

Spring Integration Error Channel Handling Broken when used with Spring Cloud Sleuth

I have a demo project created: https://github.com/imram/si-errorhandling-sleuth. I am having issue that when I use Spring Cloud Sleuth in my Spring Integration Application then Error Flow gets broken, i.e. gateway halts infinitely/ until timeouts if…
0
votes
1 answer

spring-cloud-sleuth services integration with 3rd party services

I have a couple of microservices: A and B. A calls B, B calls some external service. A and B uses Sleuth. Sleuth defines header X-B3-TraceId and X-B3-SpanId. So A will propagate headers to B and B to external service... Question: does service B…
Pavel
  • 653
  • 2
  • 11
  • 31
0
votes
1 answer

Spring cloud Zipkin server data retention period

I am using Spring cloud Zipkin to trace calls with sample percentage 0.4. I am not using any persistent storage like MySQL or Cassandra. Could you please let me know how to set data retention period in Zipkin server e.g. I want to check only 6…
Debopam
  • 3,198
  • 6
  • 41
  • 72
0
votes
2 answers

Dynamic | User case Based logging

Is there any logging framework, which helps me change logging levels dynamically based on the request parameters received ? If request has a parameter with debug enabled to true, then only it should log, else not. Does spring sleuth provide this…
0
votes
1 answer

Jax-rs and amqp zipkin integration

I've been roaming the depths of the internet but I find myself unsatisfied by the examples I've found so far. Can someone point me or, show me, a good starting point to integrate zipkin tracing with jaxrs clients and amqp clients? My scenario is…
0
votes
1 answer

spring-cloud-sleuth header from legacy application

While creating a microservice I decided to experiment with Spring-cloud sleuth. My calling application is still on old version of Spring and it is not possible to include Spring-cloud-sleuth into the scope. While referring to the documentation, it…
Varesh
  • 1,648
  • 2
  • 14
  • 22
0
votes
2 answers

Sleuth + Zipkins with Elasticsearch

Can anyone point me towards the required/working configuration to use Elasticsearch as a storage type with Zipkins with Sleuth? pom.xml ' Spring Boot Zipkin Server