Skip to content

Commit 3aa7e88

Browse files
authored
Remove support for traceparent (#994)
1 parent 9784608 commit 3aa7e88

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

src/Sentry/Laravel/Features/HttpClientIntegration.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Sentry\Tracing\SpanStatus;
1919
use function Sentry\getBaggage;
2020
use function Sentry\getTraceparent;
21-
use function Sentry\getW3CTraceparent;
2221

2322
class HttpClientIntegration extends Feature
2423
{
@@ -56,8 +55,7 @@ public function attachTracingHeadersToRequest(RequestInterface $request)
5655
if ($this->shouldAttachTracingHeaders($request)) {
5756
return $request
5857
->withHeader('baggage', getBaggage())
59-
->withHeader('sentry-trace', getTraceparent())
60-
->withHeader('traceparent', getW3CTraceparent());
58+
->withHeader('sentry-trace', getTraceparent());
6159
}
6260

6361
return $request;

src/Sentry/Laravel/Features/QueueIntegration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public function onBoot(Dispatcher $events): void
8080

8181
if ($payload !== null) {
8282
$payload[self::QUEUE_PAYLOAD_BAGGAGE_DATA] = getBaggage();
83-
$payload[self::QUEUE_PAYLOAD_TRACE_PARENT_DATA] = getTraceparent();
8483
$payload[self::QUEUE_PAYLOAD_PUBLISH_TIME] = microtime(true);
8584
}
8685

src/Sentry/Laravel/Integration.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,12 @@ public static function sentryTracingMeta(): string
194194
/**
195195
* Retrieve the `traceparent` meta tag with tracing information to link this request to front-end requests.
196196
*
197+
* @deprecated since version 4.14. To be removed in version 5.0.
197198
* @return string
198199
*/
199200
public static function sentryW3CTracingMeta(): string
200201
{
201-
return sprintf('<meta name="traceparent" content="%s"/>', getW3CTraceparent());
202+
return '';
202203
}
203204

204205
/**

src/Sentry/Laravel/Tracing/Middleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private function startTransaction(Request $request, HubInterface $sentry): void
151151
);
152152

153153
$context = continueTrace(
154-
$request->header('sentry-trace') ?? $request->header('traceparent', ''),
154+
$request->header('sentry-trace', ''),
155155
$request->header('baggage', '')
156156
);
157157

0 commit comments

Comments
 (0)