Skip to content

Remove support for traceparent #994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/Sentry/Laravel/Features/HttpClientIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use Sentry\Tracing\SpanStatus;
use function Sentry\getBaggage;
use function Sentry\getTraceparent;
use function Sentry\getW3CTraceparent;

class HttpClientIntegration extends Feature
{
Expand Down Expand Up @@ -56,8 +55,7 @@ public function attachTracingHeadersToRequest(RequestInterface $request)
if ($this->shouldAttachTracingHeaders($request)) {
return $request
->withHeader('baggage', getBaggage())
->withHeader('sentry-trace', getTraceparent())
->withHeader('traceparent', getW3CTraceparent());
->withHeader('sentry-trace', getTraceparent());
}

return $request;
Expand Down
1 change: 0 additions & 1 deletion src/Sentry/Laravel/Features/QueueIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public function onBoot(Dispatcher $events): void

if ($payload !== null) {
$payload[self::QUEUE_PAYLOAD_BAGGAGE_DATA] = getBaggage();
$payload[self::QUEUE_PAYLOAD_TRACE_PARENT_DATA] = getTraceparent();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it intentional to remove this line? Seems unrelated to w3ctraceparent..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, #995

$payload[self::QUEUE_PAYLOAD_PUBLISH_TIME] = microtime(true);
}

Expand Down
3 changes: 2 additions & 1 deletion src/Sentry/Laravel/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,12 @@ public static function sentryTracingMeta(): string
/**
* Retrieve the `traceparent` meta tag with tracing information to link this request to front-end requests.
*
* @deprecated since version 4.14. To be removed in version 5.0.
* @return string
*/
public static function sentryW3CTracingMeta(): string
{
return sprintf('<meta name="traceparent" content="%s"/>', getW3CTraceparent());
return '';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/Laravel/Tracing/Middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private function startTransaction(Request $request, HubInterface $sentry): void
);

$context = continueTrace(
$request->header('sentry-trace') ?? $request->header('traceparent', ''),
$request->header('sentry-trace', ''),
$request->header('baggage', '')
);

Expand Down