I have a Cloud Run service and in front of that is the Cloud Load Balancer. I have integrated tracing into the code running in the Cloud Run service and it's working fine, but I have some lingering questions:
To give context to these questions, note that when Cloud Load Balancer relays HTTP requests to Cloud Run,
it generates a X-Cloud-Trace-Context header, so the caller doesn't have to provide one in the HTTP request, but if they do, Cloud Load Balancer will use that instead.
My first question is about
LogEntry.spanId that is seen in Logs Viewer. How exactly is that populated? It does not match the span ID value in the trace header my backend Cloud Run service is receiving. Looking in Trace Viewer, I don't see this value anywhere.
Second, how do I get the "View trace details" option to work in Logs Viewer? It says
here that traceSampled needs to be true, but when
sending a header with "o=1", it still doesn't enable.