I'm trying to use Stackdriver tracing while running a Google Cloud Run instance.
However, when tracing a call from point A to the container instance, the trace parent_span_id is broken. This leads to a broken trace on the stackdriver view that looks like the following:
The first line in the image is the call to my Cloud Run endpoint. The last two lines are the trace from that endpoint. Notice how the display fails to present them properly.
From my investigation, the parent_span_id in the span presented in the end is a span_id that is never reported to StackDriver, meaning the UI (or a human) can't put together the trace.
My theory is that the Google Cloud endpoint that does SSL/TLS termination replaces the span with it's own span (legitimate) but then never reports its own traffic to Stackdriver, breaking all traces that cross a GCR boundary.
This theory seems bolstered by the unofficial FAQ maintained by ahmetb (as of December 2019).
This seems to happen regardless of whether the container is using node.js or python or any other runtime.
Any ideas/suggestions or something I missed?