From 4db84c719fe373f42b9c0b2fbc3e310db1ed3b72 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Fri, 30 Sep 2022 14:24:18 +0200 Subject: [PATCH 1/2] ref: Align Span Operations with new spec --- src/Sentry/Laravel/Tracing/Middleware.php | 6 +++--- src/Sentry/Laravel/Tracing/ViewEngineDecorator.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Sentry/Laravel/Tracing/Middleware.php b/src/Sentry/Laravel/Tracing/Middleware.php index e6b61468..24eb8341 100644 --- a/src/Sentry/Laravel/Tracing/Middleware.php +++ b/src/Sentry/Laravel/Tracing/Middleware.php @@ -123,7 +123,7 @@ private function startTransaction(Request $request, HubInterface $sentry): void $bootstrapSpan = $this->addAppBootstrapSpan($request); $appContextStart = new SpanContext(); - $appContextStart->setOp('laravel.handle'); + $appContextStart->setOp('middleware.handle'); $appContextStart->setStartTimestamp($bootstrapSpan ? $bootstrapSpan->getEndTimestamp() : microtime(true)); $this->appSpan = $this->transaction->startChild($appContextStart); @@ -144,7 +144,7 @@ private function addAppBootstrapSpan(Request $request): ?Span } $spanContextStart = new SpanContext(); - $spanContextStart->setOp('laravel.bootstrap'); + $spanContextStart->setOp('app.bootstrap'); $spanContextStart->setStartTimestamp($laravelStartTime); $spanContextStart->setEndTimestamp($this->bootedTimestamp); @@ -168,7 +168,7 @@ private function addBootDetailTimeSpans(Span $bootstrap): void } $autoload = new SpanContext(); - $autoload->setOp('laravel.autoload'); + $autoload->setOp('app.php.autoload'); $autoload->setStartTimestamp($bootstrap->getStartTimestamp()); $autoload->setEndTimestamp(SENTRY_AUTOLOAD); diff --git a/src/Sentry/Laravel/Tracing/ViewEngineDecorator.php b/src/Sentry/Laravel/Tracing/ViewEngineDecorator.php index f6e3abd1..79e262b5 100644 --- a/src/Sentry/Laravel/Tracing/ViewEngineDecorator.php +++ b/src/Sentry/Laravel/Tracing/ViewEngineDecorator.php @@ -36,7 +36,7 @@ public function get($path, array $data = []): string } $context = new SpanContext(); - $context->setOp('laravel.view'); + $context->setOp('view.render'); $context->setDescription($this->viewFactory->shared(self::SHARED_KEY, basename($path))); $span = $parentSpan->startChild($context); From b46dd6eba7d13938e18ce531a4065dab78261211 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Fri, 30 Sep 2022 14:26:15 +0200 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cb14e79..6e5f63b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Fix not listening to queue events because `QueueManager` is registered as `queue` in the container and not by it's class name (#568) - Fix status code not populated on transaction if response did not inherit from `Illuminate\Http\Response` like `Illuminate\Http\JsonResponse` (#573) +- Align Span Operations with new spec (#574) ## 2.13.0