From cdb7d1145f9a245617803aef0f56e022d409c417 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 19 May 2026 14:46:49 +0100 Subject: [PATCH 1/2] Add troubleshooting section for GCP --- .../observability/apm-agent-dotnet/apm-net-agent.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/troubleshoot/observability/apm-agent-dotnet/apm-net-agent.md b/troubleshoot/observability/apm-agent-dotnet/apm-net-agent.md index c6e46cf7a3..ebcf7f2d45 100644 --- a/troubleshoot/observability/apm-agent-dotnet/apm-net-agent.md +++ b/troubleshoot/observability/apm-agent-dotnet/apm-net-agent.md @@ -286,3 +286,12 @@ Elastic APM .NET Agent (and likely also other agents which correctly handle the We recommend using `trace_continuation_strategy` set to `restart` or `restart_external`, so that the APM .NET Agent will ignore the incoming traceparent header sampling flag. + +## Broken distributed traces on Google Cloud Run [gcp-cloud-run-broken-distributed-traces] + +Services deployed on Google Cloud Run may show transactions as root transactions rather than child spans, and the APM UI may show "incomplete trace" warnings even when the upstream caller is correctly instrumented. + +Google Cloud Run's infrastructure intercepts every inbound HTTP request before it reaches the application. It creates a span in Google Cloud Trace and overwrites the W3C `traceparent` header with a new value referencing that GCP-internal span. The Elastic APM .NET agent reads this overwritten header, so all transactions started by the Cloud Run service become children of a GCP-internal span that Elastic APM has no visibility into. + +This is infrastructure-level behavior with no opt-out mechanism currently available in Cloud Run. It is tracked in [Google's issue tracker](https://issuetracker.google.com/issues/253419736). There is no workaround available for the Elastic APM .NET agent at this time. + From f73b2baa41e6ef45793fcc33c02ad4f245730e33 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 19 May 2026 15:05:45 +0100 Subject: [PATCH 2/2] Lint feedback --- troubleshoot/observability/apm-agent-dotnet/apm-net-agent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/troubleshoot/observability/apm-agent-dotnet/apm-net-agent.md b/troubleshoot/observability/apm-agent-dotnet/apm-net-agent.md index ebcf7f2d45..7748fd396b 100644 --- a/troubleshoot/observability/apm-agent-dotnet/apm-net-agent.md +++ b/troubleshoot/observability/apm-agent-dotnet/apm-net-agent.md @@ -289,7 +289,7 @@ We recommend using `trace_continuation_strategy` set to `restart` or `restart_ex ## Broken distributed traces on Google Cloud Run [gcp-cloud-run-broken-distributed-traces] -Services deployed on Google Cloud Run may show transactions as root transactions rather than child spans, and the APM UI may show "incomplete trace" warnings even when the upstream caller is correctly instrumented. +Services deployed on Google Cloud Run might show transactions as root transactions rather than child spans, and the APM UI might show "incomplete trace" warnings even when the upstream caller is correctly instrumented. Google Cloud Run's infrastructure intercepts every inbound HTTP request before it reaches the application. It creates a span in Google Cloud Trace and overwrites the W3C `traceparent` header with a new value referencing that GCP-internal span. The Elastic APM .NET agent reads this overwritten header, so all transactions started by the Cloud Run service become children of a GCP-internal span that Elastic APM has no visibility into.