Skip to content

Commit

Permalink
ref: Align Span Operations with new spec
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Sep 30, 2022
1 parent 52e4011 commit 4db84c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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 4db84c7

Please sign in to comment.