Skip to content

Commit d63b8c9

Browse files
fix: Remove traceparent header (#1004) (#1005)
1 parent 9989a19 commit d63b8c9

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/Tracing/HttpClient/AbstractTraceableHttpClient.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public function request(string $method, string $url, array $options = []): Respo
9494
if (self::shouldAttachTracingHeaders($client, $uri)) {
9595
$headers['baggage'] = $childSpan->toBaggage();
9696
$headers['sentry-trace'] = $childSpan->toTraceparent();
97-
$headers['traceparent'] = $childSpan->toW3CTraceparent();
9897
}
9998

10099
$options['headers'] = $headers;

tests/Tracing/HttpClient/TraceableHttpClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ public function testRequest(): void
9393
$this->assertSame('GET', $response->getInfo('http_method'));
9494
$this->assertSame('https://username:password@www.example.com/test-page?foo=bar#baz', $response->getInfo('url'));
9595
$this->assertSame([\sprintf('sentry-trace: %s', $spans[1]->toTraceparent())], $mockResponse->getRequestOptions()['normalized_headers']['sentry-trace']);
96-
$this->assertSame([\sprintf('traceparent: %s', $spans[1]->toW3CTraceparent())], $mockResponse->getRequestOptions()['normalized_headers']['traceparent']);
9796
$this->assertSame([\sprintf('baggage: %s', $transaction->toBaggage())], $mockResponse->getRequestOptions()['normalized_headers']['baggage']);
97+
$this->assertArrayNotHasKey('traceparent', $mockResponse->getRequestOptions()['normalized_headers']);
9898
$this->assertNotNull($transaction->getSpanRecorder());
9999

100100
$spans = $transaction->getSpanRecorder()->getSpans();

0 commit comments

Comments
 (0)