-
I'm thinking about how to instrument a batch processing pipeline that accesses a set of files. Basically the only thing that each step in the pipeline is aware of is the filename, which is unique. I am imagining having an end-to-end trace in place for all the steps that have accessed a particular file in some way. If I understand things correctly, a Context needs to be "propagated", so can I somehow construct the same Context using the filename in each of the steps in the pipeline? I keep reading mentions that it's possible to define the Context explicitly but haven't yet seen concrete examples how to do this. Or does this just mean that I use the same trace ID everywhere and base it on the filename somehow? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
If the only thing that the step is aware of is the filename, it will probably be quite difficult to propagate the trace across step boundaries. Are the steps running on the same thread? Are they even running on the same machine? The thing that makes a trace coherent, is the TraceId that is associated with each span. So, at the very minimum, you have to have a way to make sure that the TraceId is accessible when you are creating each span. |
Beta Was this translation helpful? Give feedback.
If the only thing that the step is aware of is the filename, it will probably be quite difficult to propagate the trace across step boundaries. Are the steps running on the same thread? Are they even running on the same machine?
The thing that makes a trace coherent, is the TraceId that is associated with each span. So, at the very minimum, you have to have a way to make sure that the TraceId is accessible when you are creating each span.