Opentelemetry PHP traces doesn't shows on cross app

76 Views Asked by At

I'm implementing OpenTelemetry for application monitoring. My application uses .NET for the backend and PHP for the front end, and everything is configured using the OpenTelemetry auto-instrumentation. For .NET I can see all the traces between different .NET applications combined into the same span. But I can't see the PHP traces on the same span as backend when it sends a request to the backend. I can only see the PHP traces as their own span. Just wondering if there is a way to combine those traces (frontend and backend)?

1

There are 1 best solutions below

0
Brett McBride On

It looks like you have all of the correct packages installed to enable context propagation, which should link your PHP and .NET spans together in Jaeger.

The opentelemetry-auto-psr18 package which you have installed does that for you. You should check that when you make a request from PHP to your .NET backend, that you are using the PSR-18 client's sendRequest method. Many HTTP clients support PSR-18 but also provide other methods such as get, post etc, and those might not use sendRequest internally.