You are here

private function TwigTracingExtension::getSpanDescription in Raven: Sentry Integration 3.x

Gets a short description for the span.

Parameters

\Twig\Profiler\Profile $profile: The profiling data.

1 call to TwigTracingExtension::getSpanDescription()
TwigTracingExtension::enter in src/Twig/TwigTracingExtension.php
This method is called before execution.

File

src/Twig/TwigTracingExtension.php, line 95

Class

TwigTracingExtension
Provides Twig performance tracing.

Namespace

Drupal\raven\Twig

Code

private function getSpanDescription(Profile $profile) : string {
  switch (TRUE) {
    case $profile
      ->isRoot():
      return $profile
        ->getName();
    case $profile
      ->isTemplate():
      return $profile
        ->getTemplate();
    default:
      return sprintf('%s::%s(%s)', $profile
        ->getTemplate(), $profile
        ->getType(), $profile
        ->getName());
  }
}