sentry-php icon indicating copy to clipboard operation
sentry-php copied to clipboard

Add tracePropagationTargets option

Open cleptric opened this issue 3 years ago • 3 comments

Problem Statement

https://develop.sentry.dev/sdk/performance/#tracepropagationtargets

The GuzzleTracingMiddleware currently propagates the sentry-trace and soon the baggage header on each instrumented request.

Solution Brainstorm

Add the tracePropagationTargets option.

cleptric avatar Sep 14 '22 09:09 cleptric

What should tracePropagationTargets do? We can't do anything "automagically" in the base PHP SDK... Maybe it's feasible in the framework integrations, on the framework-provided clients.

Jean85 avatar Sep 14 '22 14:09 Jean85

We have to check for it in the GuzzleTracingMiddleware and add the Option. Thereafter, we have to update Laravel and Symfony as well.

cleptric avatar Sep 14 '22 14:09 cleptric

That option configures when we sent the sentry-trace and baggage headers with the request.

See: https://docs.sentry.io/platforms/javascript/performance/instrumentation/automatic-instrumentation/#tracingorigins

No need for any magic or automagic anything, just statically configured by the user 😄

stayallive avatar Sep 14 '22 15:09 stayallive