You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of this I assume the issue is that a requests call is made during cloud trace export, which results in a span being recorded by the instrumentor and thus a new call to cloud trace export before the first one has complete auth set-up, resulting in new auth set-up and so on.
Because of this I assume the issue is that a requests call is made during cloud trace export, which results in a span being recorded by the instrumentor and thus a new call to cloud trace export before the first one has complete auth set-up, resulting in new auth set-up and so on.
👍 that's sounds correct and I've seen this issue as well. There is a suppress_instrumentation context key that is supposed to fix this looping problem but IIRC it gets thrown away at some point.
Because Cloud Run requires SimpleSpanProcessor, this essentially means RequestInstrumentor cannot be used in that environment.
Where do you see that Cloud Run requires SimpleSpanProcessor? I would actually recommend never using SimpleSpanProcessor and always using BatchSpanProcessor. Just make sure you call TracerProvider.shutdown() in a SIGTERM handler as described in Cloud Run documentation to flush any buffered telemetry.
If you enable RequestsInstrumentor while using CloudTraceSpanExporter with SimpleSpanProcessor, you get an infinite loop on the first span exported.
When running locally, I see the following lines repeated with log level debug:
When running in cloud run, I see the following log entry repeated:
Because of this I assume the issue is that a requests call is made during cloud trace export, which results in a span being recorded by the instrumentor and thus a new call to cloud trace export before the first one has complete auth set-up, resulting in new auth set-up and so on.
This blog post appears to document the same issue: https://minherz.medium.com/today-i-learned-why-using-opentelemetry-requestsinstrumentor-can-freeze-your-application-ae09410b016d
Because Cloud Run requires SimpleSpanProcessor, this essentially means RequestInstrumentor cannot be used in that environment.
The text was updated successfully, but these errors were encountered: