is it possible that sleuth generates a duplicate trace ids
I started to notice in Zipkin, that I have some of different requests sharing the same trace id, knowing that trace ids are generated with this format , 9e910dcf10ed8c69 . what can be the possible factors that led to multiple requests sharing the same id ?
It shouldn't take place. Most likely it's a result of bug. Are you using Zuul? Might be related to https://github.com/spring-cloud/spring-cloud-sleuth/issues/634 maybe?
@marcingrzejszczak yes I am :) what release train/spring boot version do you recommend me to use in applications that are using zuul ? in order for this not to happen?
So this has just been fixed but not yet released. We will try to release it quite soon. Until then you'd have to use the snapshots :/ The fix will be available in Dalston, Edgware and Finchley (1.2.x, 1.3.x and 2.0.x versions of Sleuth)
@marcingrzejszczak thanks a lot for ur feedback, question are u aware if this also effects previous versions of spring cloud like Camden.SR2, or previous versions of sleuth ?
I'm pretty sure it does :/
thanks , its fixed now so thats the more important thing. 😺
private long createId() {
return this.random.nextLong();
}
@Bean
@ConditionalOnMissingBean
public Random randomForSpanIds() {
return new Random();
}
it seems that the problems are still happen,the source code is the same as previous version.only the random can not prevent duplicate trace ids