Skip to content

Commit

Permalink
ref: Align Span Operations with new spec (#574)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Bouma <alex@bouma.me>
  • Loading branch information
cleptric and stayallive committed Sep 30, 2022
1 parent 2224e80 commit e6b22bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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)
- Fix broken `SetRequestMiddleware` on Laravel < 6.0 (#575)

## 2.13.0
Expand Down
6 changes: 3 additions & 3 deletions src/Sentry/Laravel/Tracing/Middleware.php
Expand Up @@ -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);
Expand All @@ -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);

Expand All @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/Laravel/Tracing/ViewEngineDecorator.php
Expand Up @@ -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);
Expand Down

0 comments on commit e6b22bb

Please sign in to comment.