Comments (10)
Zipkin also offers instrumentation for Thrift services. If we are going for interop we should do the same, ultimately.
from spring-cloud-sleuth.
@adriancole thoughts? Have those headers changed?
from spring-cloud-sleuth.
X-B3-Flags: a Long
was a mistake imho. I'll see if finagle folks want to remove this. The others are stable. PS there's a nuance hex strings are lowercase fixed-width.
from spring-cloud-sleuth.
What do we do about this? We can close it I guess?
from spring-cloud-sleuth.
I think we still need it. But maybe not urgent for 1.0.
from spring-cloud-sleuth.
The bit size is aligned at this point. I'd recommend preferring B3 headers as the majority of instrumentation use these.
For example, there's no ruby-sleuth, and we'd needlessly re-start traces as a side-effect of passing through sleuth. The only architecture where the current choice doesn't hurt is when then entire architecture is made of sleuthed boot apps.
Here's the effect of being incompatible in polyglot or otherwise zipkin architecture:
Trace starts in zipkin instrumented entrypoint. This calls out to sleuth which ignores the headers and starts a new trace. Sleuth calls out downstream with an incompatible header. The receiver ignores that header and can't see the original headers so thinks its a new trace again. So 3 traces for the same trace in the same zipkin span store.
from spring-cloud-sleuth.
@marcingrzejszczak thanks for picking this up, looking forward to seeing it done!
from spring-cloud-sleuth.
I'll put some of @adriancole 's notes from Gitter
I think the core issue here is externalizing how to deal with out-of-process propagation
similarly to how reporting is configurable, yet doesn't change the structure of the span
ex in opentracing, hydrating a span from headers is "joining" and pushing a span into headers is "injecting" ( a term that sadly clashes with DI ) https://github.com/opentracing/opentracing-java/blob/master/opentracing/src/main/java/opentracing/Tracer.java#L51
Given this, you could make a component that, for example uses B3 defaults so that it interoperates with the most existing instrumentation
and that might include additional headers that help sleuth, for example the "process id" thing
if someone wanted to override that, they'd add a different component, as encoding is likely much more than just changing naming prefix.
#19 << for those wondering what we're discussing
in the javadoc for the propagator component, I'd mention what it is compatible with
for example, this can join traces originated by the following (currenlty only sleuth)
and this can propagate traces to instrumentation compatible with (currently only sleuth)
as mentioned in the issue, we'd get interop with several languages and frameworks on both sides simply by using B3 headers by default
and:
yeah basically you could extract a component which joins and injects
and make that default to B3
join (taking headers and making a span in consideration of them)
inject (take a span and make headers out of it)
from spring-cloud-sleuth.
So actually this issue composes of two:
- make headers configurable
- make headers zipkin compatible
The first one is already possible with Joiners and Injectors
The second one is in progress.
With finishing the second one I'll update the docs and show how one can make the headers configurable
from spring-cloud-sleuth.
@drpotato - check out the docs - http://cloud.spring.io/spring-cloud-sleuth/spring-cloud-sleuth.html#_customizations
from spring-cloud-sleuth.
Related Issues (20)
- I want to propagate TraceId to all places where parallelStream() and CustomForkJoinPool is used. HOT 3
- CVE-2023-33201 - bcprov-jdk15on HOT 5
- Missing traceId when using spring-cloud-starter-stream-rabbit consumer listeners. HOT 5
- Tracing support for Reactive Kafka (Using KafkaSender and KafkaReceiver) HOT 2
- Spring boot 2.7.10/Sleuth/Micrometer/Prometheus/Brave/Zipkin HOT 1
- java.lang.IllegalStateException: Missing: traceId with AWS propagation type HOT 5
- Jetty BadMessageException request headers too large HOT 3
- LazyTraceThreadPoolTaskExecutor.getQueueSize() does not call a delegate and always returns 0 HOT 3
- ReactorSleuth.tracedMono does not work with parallel processing HOT 1
- TraceReactorAutoConfiguration.HooksRefresher improper queue decoration
- Need documentation for collecting data using baggage. HOT 1
- Sleuth giving different traceIds for each RxJava's Single execution HOT 3
- TraceIds feature for a Request tarvelling across, doesn't seem working. TraceIds are different across a travelling request HOT 3
- After @Async is included in rpc, traceId loss and confusion occur under a large number of requests. HOT 4
- Autoconfiguration does not work in spring-boot 3.x HOT 1
- docs: Getting Started Image Not found
- DataSource Proxy + Spring Could Sleuth not working HOT 4
- spring.zipkin.discoveryClientEnabled ignored when the traced app is webflux HOT 1
- sleuth-3.1.9+datasource-proxy-1.10+flowable-6.8.0 Unable to start the springboot project properly HOT 1
- Why doesn't Sleuth enable Scope when create Span for Kafka Streams by default? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-cloud-sleuth.