On 04/08/2021 01:48 PM, Andrea Bonini wrote:
Hi everyone,
i have a question about opentracing addon. Is there a way for using headers
info about a trace created from an outside service?
what i want is using x-b3-traceid header from an incoming request as
traceid and use spanid as parentid
Thanks
Hello Andrea,
you are interested in propagating the span context from one service to
another. This can be done by setting up additional http headers in the
service that created the tracing process that contain the span context
which is then read in another process that wants to add its data. This
can be done via the ‘inject’ and ‘extract’ keywords in the opentracing
filter configuration. In this way they can automatically set up and
read the contents of the headers over which the span context is transmitted.
In the test directory there is one example that uses such a mode of
operation, where two haproxy processes are started, the first of which
passes the span context to the second. The example is run via the shell
script test/run-fe-be.sh and thus starts the frontend haproxy process
(fe) which passes the span context to the backend haproxy process (be).
Configurations are located in the test/fe and test/be directories.
For more explanations read the README file from the ot directory.
Best regards,
--
Zaga <[email protected]>
What can change the nature of a man?