Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 19 20:57
    spring-cloud-issues labeled #2195
  • Aug 19 20:54
    gjdev opened #2195
  • Aug 19 10:36
    marcingrzejszczak commented #1753
  • Aug 19 05:23
    jansoren commented #1753
  • Aug 19 05:23
    jansoren commented #1753
  • Aug 18 16:42
    lette1394 commented #2100
  • Aug 18 16:15

    spring-builds on 3.1.x

    Bumping versions (compare)

  • Aug 18 14:57
    spicalous commented #1863
  • Aug 18 10:33
    marcingrzejszczak milestoned #2187
  • Aug 18 10:32
    marcingrzejszczak closed #2187
  • Aug 18 10:32

    marcingrzejszczak on 3.1.x

    Updated the docs to use tests; … (compare)

  • Aug 17 20:44
    oscarmtzg commented #2161
  • Aug 17 15:32
    marcingrzejszczak commented #2187
  • Aug 17 15:28
    sergey-morenets commented #2187
  • Aug 17 13:18
    marcingrzejszczak labeled #2188
  • Aug 17 13:18
    marcingrzejszczak unlabeled #2188
  • Aug 17 13:18
    marcingrzejszczak unlabeled #2187
  • Aug 17 13:18
    marcingrzejszczak unlabeled #2187
  • Aug 17 13:18
    marcingrzejszczak labeled #2187
  • Aug 17 13:18
    marcingrzejszczak labeled #2187
Jarle Hansen
@jarlehansen
when switching to otel from brave, we have to rewrite how the trace context is sent into the coroutine scope. For brave we used something similar to this: TracingContextElement https://github.com/openzipkin/brave/issues/820#issuecomment-447614394
does anyone know how can we write this with the otel API?
5 replies
Pankaj
@p1729
sleuth Hoxton.RELEASE of spring cloud use to take application name mentioned in bootstrap.properties earlier, has this been changed in recent releases 2021.0.1 spring cloud... is adding the application name in the application.properties fine. I just want it to be in the logging for tracing ?
2 replies
Pervage Alam
@pervage
Hello Everyone, While running the spring boot application with sleuth dependency I am getting exception - context initialization failed org springframework beans factory unsatisfieddependencyexception. I am using spring version 2.3.2 and sleuth-hoxton version 1.3.1
1 reply
w752477768
@w752477768
app_id:"4936f2bb-1759-436c-8647-60f09209a5da" app_index:"0" instance_id:"d31bfaeb-6cd2-4ad0-4bfa-af88" x_cf_routererror:"-" x_b3_traceid:"370037f905cc969b4abfd11ed7f718dd" x_b3_spanid:"370037f905cc969b4abfd11ed7f718dd" x_b3_parentspanid:"-" b3:"370037f905cc969b4abfd11ed7f718dd-370037f905cc969b4abfd11ed7f718dd"
Hello everyone, I don't know why x_b3_traceid has become 32-bit. I want to know if there is any way to change it to 16-bit x_b3_traceid?
Marcin Grzejszczak
@marcingrzejszczak
it can be either 32 or 64 bit number
srinivasvsk
@srinivasvsk
Hi, any plan when spring-cloud-sleuth-otel
goes GA? just to get some idea. Was looking around the project but didnt find it.
1 reply
Kshitiz Krishna
@kriskrishnahireright_gitlab
Can I turn off actuator tracing..its flooding the traces unnecessarily? service/actuator/prometheus
Dariusz Nowak
@dnowak
Hi, we have a mixture of 64-bit and 128-bit traceIds. It looks like 128-bit ones are generated, but only 64-bits are propagated with Kafka messages. For example d2a7b2724319ccf361dd9be9d1ff7a28 and 61dd9be9d1ff7a28. Such behaviour affects the ability to filter logs via traceId. Has anyone encountered such a situation and knows how to fix it?
6 replies
Jarle Hansen
@jarlehansen
two questions regarding error handling:
1) if the collector (the server receiving the traces) goes down, it causes a lot of error messages. We are atm using brave with zipkin format, sent over http. Is there any way of controlling the error messages and amount of exceptions logged? It is so much logged that we are drowning in these error messages
2) will spring sleuth cache the traces that are not able to be sent to the collector? or will they be dropped?
2 replies
Jack Yun
@younseunghyun
image.png

Hello :)
I use spring cloud sleuth to trace msa request.
I use spring cloud stream for events pub, sub.
I want to tracing the event pub/sub to stream(rabbitmq)
but the message doesn't have trace id header.

I use spring web flux, use sink to propagate events.
Why the event doesn't have a trace id header?

Following is the event pub code.

3 replies
Johan Körner
@tjoner
Hi everyone, is it possible to get traceId when consuming a rabbitMQ message and using a messagePostProcessor. It seems that messagePostProcessors is run before the TracingRabbitListenerAdvice AOP advice (which sets the trace ids) so the there are no trace id available when the MessagePostProcessor is invoked...
2 replies
Jarle Hansen
@jarlehansen
is it possible to edit the default tags that are added to the span? such as mvc.controller.class
3 replies
MikolajJanusz
@MikolajJanusz
Hello everyone ! I managed to get sleuth + zipkin work and send traces to jaeger on port 9411 but I had to remove
io.micrometer:micrometer-registry-prometheus
dependency, otherwise it gives me Failed to register Collector of type MicrometerCollector: project_zipkin_reporter_messages_total is already in use by another Collector of type MicrometerCollector error, seems like a conflict with zipkin/sleuth and prometheus, anyone has any idea how to resolve it ?
16 replies
Knut Schleßelmann
@kschlesselmann

Hi! Does spring Cloud Sleuth OTEL work with Reactor yet? I've got a simple project with Data Mongo Reactive and as soon as I do something with MongoDB I end up with

java.lang.NullPointerException: Cannot invoke "org.springframework.cloud.sleuth.CurrentTraceContext.maybeScope(org.springframework.cloud.sleuth.TraceContext)" because "currentTraceContext" is null
    at org.springframework.cloud.sleuth.instrument.mongodb.TraceMongoCommandListener.spanFromContext(TraceMongoCommandListener.java:126) ~[spring-cloud-sleuth-instrumentation-3.1.2.jar:3.1.2]
    at org.springframework.cloud.sleuth.instrument.mongodb.TraceMongoCommandListener.commandStarted(TraceMongoCommandListener.java:82) ~[spring-cloud-sleuth-instrumentation-3.1.2.jar:3.1.2]
    at com.mongodb.internal.event.CommandListenerMulticaster.commandStarted(CommandListenerMulticaster.java:47) ~[mongodb-driver-core-4.4.2.jar:na]
    at com.mongodb.internal.connection.ProtocolHelper.sendCommandStartedEvent(ProtocolHelper.java:298) ~[mongodb-driver-core-4.4.2.jar:na]
    at com.mongodb.internal.connection.LoggingCommandEventSender.sendStartedEvent(LoggingCommandEventSender.java:84) ~[mongodb-driver-core-4.4.2.jar:na]
    at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceiveAsync(InternalStreamConnection.java:458) ~[mongodb-driver-core-4.4.2.jar:na]
    at com.mongodb.internal.connection.UsageTrackingInternalConnection.sendAndReceiveAsync(UsageTrackingInternalConnection.java:162) ~[mongodb-driver-core-4.4.2.jar:na]
    at com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.sendAndReceiveAsync(DefaultConnectionPool.java:684) ~[mongodb-driver-core-4.4.2.jar:na]
...

Anyone an idea what's going on here?

34 replies
Knut Schleßelmann
@kschlesselmann
Other Question: How are you supposed to configure OTEL resource attributes in Sleuth OTEL? https://opentelemetry.lightstep.com/core-concepts/attributes-and-labels/ We need to set deployment.environment and so on
15 replies
Charly
@nekperu15739
Hi, in our project we are do tracing using a custom header, so i added this to config, spring.sleuth.baggage.remote-fields=x-operation-id and its working fine, however i need to set a default value it that header doesn't come into request. Any ideas?
10 replies
Noah Seger
@noahseger
Hi everyone, hope we're having a great collective week. Just wondering... this an idiomatic way to force a new trace ID?
        var span = tracer.nextSpan(null);
        try(var spanInScope = this.tracer.withSpan(span)) {
            return webClient.post().uri(url).bodyValue(message).retrieve().toBodilessEntity();
        } finally {
            span.end();
        }
3 replies
I was seeing weird issues with reused trace IDs using the @NewSpan annotation with Reactor, where the traces ended up 40+ deep for what should have been 4 total spans
Noah Seger
@noahseger
(BTW this was in v3.1.1, with spring.sleuth.reactor.instrumentation-type: MANUAL)
Noah Seger
@noahseger
Has anyone successfully instrumented spans for web requests at a lower level? I'm interested in spans for DNS resolution, connection setup, TTFB. We have an unaccountable stretch of time between a request starting and when the upstream service handles it and correlating these numbers with a specific request would help us rule out the network.
1 reply
MikolajJanusz
@MikolajJanusz
Hello everyone ! While I was setting up spring boot sleuth tracing with jaeger, I was wondering if it would be good to use openTelemetry tracer and exclude Brave from spring-cloud ? I know openTelemetry is quite new so I'm not sure if it will be good for production environment
12 replies
Jarle Hansen
@jarlehansen
handling exceptions seems a bit hard using spring sleuth zipkin. If for instance the zipkin instance is down we get a ton of these kind of errors that also include stack traces[ctor-http-nio-2] reactor.core.publisher.Operators : Operator called default onErrorDropped
I have look at the code in sleuth, and it is not easy to add a custom doOnError call for the webclient used. Are there any other ways to customize this, so we can only log for instance the message of the exception as a warning?
1 reply
Dimitrios Klimis
@dimi-nk
Hey hey. Does anyone know if you can have multiple context propagation mechanisms in parallel? Specifically, my company uses 1) "grpc-trace-bin" for gRPC, 2) "X-Cloud-Trace-Context" for HTTP, and I would prefer to have 3) B3 to ensure interoperability with other systems. The only possible solution I have come up with is to define my own Propagation.Factory which uses all three and delegates from one to the other. Another little annoyance, is that GrpcPropagation is package-private, so I have to copy that code over to our project :( Any help would be appreciated.
1 reply
nehabhi
@nehabhi

I am trying to update spring boot version of my project. These are dependencies after updating:

<spring-cloud.version>2021.0.2</spring-cloud.version>
<spring-cloud-sleuth.version>3.1.2</spring-cloud-sleuth.version>

<spring-boot.version>2.7.0</spring-boot.version>

I am getting this issue now:

"exceptionClass":"org.springframework.beans.factory.support.DefaultSingletonBeanRegistry","exceptionID":"554739b0","exceptionMethod":"getSingleton","exception":"org.springframework.beans.factory.BeanCreationNotAllowedException: 
Error creating bean with name 'braveHttpServerHandler': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)\n\tat 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)\n\tat 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)\n\tat 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)\n\tat 
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)\n\tat 
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389)\n\tat 
org.springframework.beans.factory.support.DefaultListableBeanFactory$DependencyObjectProvider.getIfAvailable(DefaultListableBeanFactory.java:20
30)\n\tat org.springframework.cloud.sleuth.instrument.web.tomcat.TraceValve.httpServerHandler(TraceValve.java:107)\n\tat 
org.springframework.cloud.sleuth.instrument.web.tomcat.TraceValve.invoke(TraceValve.java:77)\n\t... 11 frames excluded\n"}
3 replies
Salman khandu
@salman-khandu
I have used spring cloud sleuth 2.0.4. I see there are so many attributes logs with spanid and trace like
traceId=3d5f778ae9618317, spanId=3d5f778ae9618317, spanExportable=false, X-Span-Export=false, X-B3-SpanId=3d5f778ae9618317, X-B3-TraceId=3d5f778ae9618317
is there any way to remove extra attributes. I used following log pattern
%d{yyyy-MM-dd HH:mm:ss.SSS, UTC} %-5level [%thread] %logger{40} - %msg %X{}%n
1 reply
Bounkong Khamphousone
@tiboun

Hi everyone, first of all thanks for your great work! I didn't manage to log the current username set in spring security context via MDC. I've seen similar question here : https://stackoverflow.com/questions/64857188/how-to-add-user-id-taken-from-jwt-to-the-backend-logs-via-mdc and no answer to the original question was done. Does anyone have an idea on how to put the username into the MDC ?

Thanks

4 replies
Maurice Zeijen
@mzeijen
Hi everyone, question: during the Spring I/O conference it was announced that Micrometer Tracing is going to replace Spring Cloud Sleuth. What I can see is that Micrometer Tracing will have an OpenTelemetry bridge from the start. Spring Cloud Sleuth has an experimental project for OpenTelemetry integration. With Sleuth going away, what is the future of that experimental Spring Cloud Sleuth OpenTelemetry project (https://github.com/spring-projects-experimental/spring-cloud-sleuth-otel)? Will it ever be released or is it going to be abandoned in favour Micrometer Tracing?
10 replies
Salman khandu
@salman-khandu
Is there any way to lowercase spanid and traceid keys? I see in logs it is printed as spanId and traceId. I want to log as lowercase as my all other MDC keys are lowercase.
5 replies
Akhil
@Akhil20999519_twitter
Hiii, I am having an issue with my application when i've added spring cloud and sleuth dependency.we have already been using redis and lettuce connection factory. Now we want to add sleuth to our application. The error is
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.sleuth.autoconfig.instrument.redis.TraceRedisAutoConfiguration$LettuceConfiguration] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@67424e82]
could any one you please help me to resolve this issue.
17 replies
SerenePity
@SerenePity
This message was deleted
1 reply
Thorsten Kunz
@ThorstenKunz
Hi there, I have a setup right now where Sleuth is using the spring-cloud-sleuth-otel-autoconfiguration and the otlp exporter configured through it as well. Everything is working fine and traces are showing up as expected in the database and visualization layer. However this of course only worked automagically for everything Spring managed. For some non-Spring managed things we added some of the manual java instrumentation libraries (e.g. apache-httpclient-4.3) and injected the Spring Boot managed OpenTelemetry object into it. Also works fine and spans created by this integration also show up as expected. Now I am facing the issue that other instrumentations that I would like to add (e.g. netty-4.1) are only available as javaagent. So question is if there is a recommended way on how I can "attach" the javaagent based instrumentation to the Spring Boot autoconfigured OpenTelemetry object so I don't need to configure the javagent stuff via cli args, etc.?
2 replies
Sam Lightfoot
@samlighty_twitter
Hi - we are using Reactor/WebFlux with Sleuth and are finding that trace ids are intermittently being re-used for calls made in close proximity to each other. On the surface does this sound like it could be a config issue as opposed to a bug, or shall I open a full issue with the details?
12 replies
Viacheslav Petriaiev
@Viacheslav-Petriaiev
Hi. I've found that Sleuth Requires Spring Boot >= 2.3.0.M1 and < 3.0.0-M1. Would it be supported for Spring Boot 3.x in the future?
9 replies
Jarle Hansen
@jarlehansen
is it possible to disable tracing just for certains paths? this is for incoming requests to a RestController
1 reply
SerenePity
@SerenePity
Why is the LazyTraceThreadPoolTaskScheduler no longer public? We need to wrap a ThreadPoolTaskScheduler that executes tasks via a CronTrigger that takes in a runtime-generated expression
Lucas Åström
@Jinxit
I'm using spring-sleuth with the zipkin sender right now, and all the spans are by default named in full lowercase and without the class names, which is not very readable to me. Is it possible for me to customize that? I found something about zipkin always being in lowercase, but I've seen Java code send stuff to Jaeger in camelCase before (at a previous client) so were they then using some different protocol?
7 replies
pruthirajmohanty
@pruthirajmohanty
Hello @marcingrzejszczak I am new to sleuth and I have a requirement where my standalone spring-boot application have Kafka stream which keep consuming the data from Kafka and pushing to Cassandra db. but I want to implement sleuth tracing for each time consuming the data from Kafka topic, could you help me with sample code or github reference to above requirement.
1 reply
Jakub Bączek
@kubehe

Hey, @marcingrzejszczak

Is there any specific reason why annotation @SpanTag is not repeatable?

My team member is thinking of creating our own aspect that would do similar job, we have object as parameter to method and we want to create a few tags from this object fields.

We were thinking about creation of repeatable @SpanTag annotation or @SpanTags which allows to create list of tags.

3 replies
boszczu
@boszczu
Heyo, I have an existing spring boot application for which I'm trying to setup zipkin with sleuth. I can already see that the autoconfiguration works out of the box for mysql i.e. TransactionManager - info can be found in zipkin. However I cannot find the reason why RestController instrumentation is not sending traces to zipkin.
{"@timestamp":"2022-07-19T11:23:54.999+02:00","@version":"1","message":"POST \"/api/admin/rabbit-listeners/enable\", parameters={}","logger_name":"org.springframework.web.servlet.DispatcherServlet","thread_name":"http-nio-8080-exec-5","level":"DEBUG","level_value":10000,"traceId":"c5b265e656229c12","spanId":"c5b265e656229c12"}
4 replies
Vitai Lampas
@VitaiLampas_twitter
Hi, is there a standard way to handle async calls in manual instrumentation mode?
7 replies
Nathan Deamer
@nathandeamer

Hi,
I am trying to set up spring-cloud-sleuth with spring-cloud-sleuth-otel-dependencies and have enabled the new otel collector in jaeger 1.35.0. But I don't seem to be receiving my traces in jaeger....

spring: sleuth: otel: exporter: otlp: endpoint: http://simplest-collector.default.svc.cluster.local:4317/ config: trace-id-ratio-based: 1.0

Am I missing something?

10 replies
slashron
@slashron
Hello, I'm trying on integrating spring-cloud-sleuth in our boot services. We are using GraphQLWebClient to query other services, but seems the trace information is not propagated. It's working for RestTemplate calls though. Also GraphQLWebClient is internally using org.springframework.web.reactive.function.client.WebClient under the hood. Any clues?
3 replies
Amit Kumar
@kamit-transient

Hi,
I am using Spring-cloud-gcp-starter-logging and Spring-cloud-gcp-starter-trace for logging to Google Cloud StackDriver and I am not using the Zipkin server at all, but still, I am getting below exception. Why is it trying to connect to Zipkin and why it is dropping the Spans? Here is the trace:

2022-07-26 11:24:01.587  WARN [,,] 13997 --- [/ld-lower}}] z.r.AsyncReporter$BoundedAsyncReporter   : Spans were dropped due to exceptions. All subsequent errors will be logged at FINE level.
2022-07-26 11:24:01.804  WARN [,,] 13997 --- [/ld-lower}}] z.r.AsyncReporter$BoundedAsyncReporter   : Dropped 2 spans due to StatusRuntimeException(PERMISSION_DENIED: The caller does not have permission)

io.grpc.StatusRuntimeException: PERMISSION_DENIED: The caller does not have permission
    at io.grpc.Status.asRuntimeException(Status.java:535)
    at zipkin2.reporter.stackdriver.internal.AwaitableUnaryClientCallListener.onClose(AwaitableUnaryClientCallListener.java:100)
    at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:562)
    at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:743)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:722)
    at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
    at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)

Would you please help with how to resolve this?

2 replies
crazyweeds
@crazyweeds
Unsatisfied dependency expressed through field 'threadPoolExecutor'; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'threadPoolExecutor' is expected to be of type 'java.util.concurrent.ThreadPoolExecutor' but was actually of type 'org.springframework.cloud.sleuth.instrument.async.TraceableExecutorService'
spring boot version= 2.7.2 and Spring Cloud version =2021.0.3,when I am running the junit Test.
crazyweeds
@crazyweeds
I solved. like this.
@Autowired
private TraceableExecutorService traceableExecutorService;
Jarle Hansen
@jarlehansen
how can I customize the span names, for example for incoming requests to a controller and an outgoing request to another service? tried to set @SpanName, but does not seem to do anything
4 replies
Sam Lightfoot
@samlighty_twitter
Hi - any thoughts on why WebClient::bodyToMono loses the trace information but bodyToFlux retains it, when using DECORATE_QUEUES for Reactor instrumentation mode?
1 reply