Hey Sam!
Good to hear from you.
I agree with you that we don't have any great documentation around on integration Cloud Trace with GCP Serverless product offerings like Google Cloud Functions.
Yes - Open Telemetry is suppose to be the new hotness, but there are several foot guns that makes it challenging to use with GCF/Cloud Run:
1) GCF/Functions Framework does offer any "lifecycle hooks" that ensures that generated traces are exported before the container is shutdown.
Github Issue discussion.
2) Reporting traces AFTER request completes, i.e. network request outside of the incoming request context, leads to forced container shutdown. This means that you'll see a lot of cold starts.
Github issue discussion.
Last time I tried hooking up GCF + Cloud Trace, I found this
code snippet helpful. There are some compatibility issues w/ otel-js and GCP's otel exporter, but that might be fixed now.
tl;dr - It's a wild west out there.
I'd be interested in hearing from anyone else who have experience in this area.
Thanks,
Daniel