class GuzzleHttpClientAspect extends AbstractAspect

AOP aspect that instruments all Guzzle HTTP client requests.

Intercepts GuzzleHttp\Client::transfer() to provide:

  • Trace header injection (sentry-trace, baggage)
  • Span creation and finishing for tracing
  • Breadcrumb recording via on_stats callback
  • Preservation of any existing on_stats callback
  • Per-request opt-out via the no_sentry_aspect option

This catches ALL Guzzle usage: Http:: facade, direct new Client(), and third-party packages using Guzzle internally.

Properties

array $classes
int|null $priority

The aspect priority.

from  AbstractAspect

Methods

__construct(Repository $config)

Create a new aspect instance.

mixed
process(ProceedingJoinPoint $proceedingJoinPoint)

Intercept the Guzzle transfer method.

Details

at line 49
__construct(Repository $config)

Create a new aspect instance.

Parameters

Repository $config

at line 59
mixed process(ProceedingJoinPoint $proceedingJoinPoint)

Intercept the Guzzle transfer method.

Parameters

ProceedingJoinPoint $proceedingJoinPoint

Return Value

mixed