diff --git a/NewRelic/AdaptiveInteractor.php b/NewRelic/AdaptiveInteractor.php index a9606d9..ef4d9b9 100644 --- a/NewRelic/AdaptiveInteractor.php +++ b/NewRelic/AdaptiveInteractor.php @@ -167,7 +167,7 @@ public function isSampled(): bool return $this->interactor->isSampled(); } - public function insertDistributedTracingHeaders(array $headers): void + public function insertDistributedTracingHeaders(array &$headers): void { if (!method_exists($this->interactor, 'insertDistributedTracingHeaders')) { throw new \BadMethodCallException('The decorated interaction does not implement this method'); diff --git a/NewRelic/BlackholeInteractor.php b/NewRelic/BlackholeInteractor.php index 0f91653..9d77bf4 100644 --- a/NewRelic/BlackholeInteractor.php +++ b/NewRelic/BlackholeInteractor.php @@ -136,7 +136,7 @@ public function isSampled(): bool return true; } - public function insertDistributedTracingHeaders(array $headers): void + public function insertDistributedTracingHeaders(array &$headers): void { } diff --git a/NewRelic/LoggingInteractorDecorator.php b/NewRelic/LoggingInteractorDecorator.php index 0e08b09..996be29 100644 --- a/NewRelic/LoggingInteractorDecorator.php +++ b/NewRelic/LoggingInteractorDecorator.php @@ -212,7 +212,7 @@ public function isSampled(): bool return $isSampled; } - public function insertDistributedTracingHeaders(array $headers): void + public function insertDistributedTracingHeaders(array &$headers): void { $this->logger->debug('Setting New Relic distributed tracing headers', ['headers' => $headers]); diff --git a/NewRelic/NewRelicInteractor.php b/NewRelic/NewRelicInteractor.php index 4669c03..dd5ce6b 100644 --- a/NewRelic/NewRelicInteractor.php +++ b/NewRelic/NewRelicInteractor.php @@ -155,7 +155,7 @@ public function isSampled(): bool return newrelic_is_sampled(); } - public function insertDistributedTracingHeaders(array $headers): void + public function insertDistributedTracingHeaders(array &$headers): void { if (!function_exists('newrelic_insert_distributed_trace_headers')) { throw new \BadMethodCallException('You need the "newrelic" extension version 9.8 or higher to use this method'); diff --git a/NewRelic/NewRelicInteractorInterface.php b/NewRelic/NewRelicInteractorInterface.php index c6ecc86..b4a6dce 100644 --- a/NewRelic/NewRelicInteractorInterface.php +++ b/NewRelic/NewRelicInteractorInterface.php @@ -19,7 +19,7 @@ * @method array getTraceMetadata() * @method array getLinkingMetadata() * @method bool isSampled() - * @method void insertDistributedTracingHeaders(array $headers) + * @method void insertDistributedTracingHeaders(array &$headers) * @method void acceptDistributedTraceHeaders(array $headers, string $transportType = 'HTTP') */ interface NewRelicInteractorInterface