Closed shankarwww closed 5 years ago
this will break semantics as if you change the span ID you should usually also change the parent ID...
actually the parent ID part is distracting in messaging as it isn't used. the header should be written with B3SingleFormat.writeB3SingleFormatWithoutParentId
or similar. That way, stale parent ID isn't propagated.
To your original issue, I think you are interested in a custom propagation extractor I think.. this isn't currently supported, but we are working on a messaging abstraction and can consider this.
ok..i have edited my question. My main challenge is how can i keep the trace id same ?
actually the parent ID part is distracting in messaging as it isn't used. the header should be written with
B3SingleFormat.writeB3SingleFormatWithoutParentId
or similar. That way, stale parent ID isn't propagated.To your original issue, I think you are interested in a custom propagation extractor I think.. this isn't currently supported, but we are working on a messaging abstraction and can consider this.
The challenge in my project is that the tibco jms headers cannot be changed now. Its a big change and it will impact many project. So the traceId which is originally generated by angular7 application, is passed in the payload to tibco queues. Now this message is received from the queue via @JmsListener by backend system build in spring boot 2.
if I understand properly. what's going on is that you have a header named "ServiceCorrelationID" when it should be named "b3", and you can't change your angular apps so you prefer to change your java apps.
you will literally need to hack I think, use aop, bytebuddy or something to rename the header before the tracing JMS consumer is invoked. once the header is named properly the code should pickup the trace as you'd expect.
I'm closing this out as it isn't a feature we support, to rename header regardless of if they are http or messaging. You can look for #914 about more pluggability in messaging, which likely would help with this. However, that won't land for at least weeks. If you want to ask more questions, you can contact us on gitter. Good luck. https://gitter.im/openzipkin/zipkin
I am using spring boot 2 with dependency as:
My project is jms based application which receives message from a TIBCO queue, process it and then replies back to the same queue.
Request received is in xml form which contains ServiceCorrelationID in the header. The content inside ServiceCorrelationID contains the B3SingleFormat for trace and span id which is already generated by some other project.
Requirement: What the requirement to not generate new span and trace it but use the data coming in the ServiceCorrelationID but change only span id. The incoming span will become the parent id. i.e:
How can i customize the generated span to meet my requirement ?