Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Tracing between services in app engine flexible #1019

@hlarsson

Description

@hlarsson

Tracing across different services in app engine flexible doesn't seem to work properly.
In a http call from service A to service B, the X-Cloud-Trace-Context header isn't set by A, so app engine creates a new trace id and sets it in the X-Cloud-Trace-Context header. So now the X-B3-TraceId header and X-Cloud-Trace-Context header are different. Service B sees the X-Cloud-Trace-Context and uses this for tracing.
This breaks the trace chain in the google console..
When running locally the X-Cloud-Trace-Context is never set and then everything works as expected.

As an example of this, replace the URL in the trace sample here:
https://github.com/spring-cloud/spring-cloud-gcp/blob/8ac48c5dea656c9eeb138a2b3bc2f27690372435/spring-cloud-gcp-samples/spring-cloud-gcp-trace-sample/src/main/java/com/example/WorkService.java#L40
with the public url of the service, ie https://<service>-dot-<project>.appstpot.com. With localhost it works.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions