Skip to content
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

ref: Align Span Operations with new spec #574

Merged
merged 3 commits into from Sep 30, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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