Skip to content

Commit

Permalink
fix: Update span ops
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Oct 6, 2022
1 parent bf8e336 commit c6f52ec
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions phpstan.neon
Expand Up @@ -10,6 +10,8 @@ parameters:
- src/aliases.php
excludePaths:
- src/aliases.php
- src/Tracing/Cache/TraceableCacheAdapterForV2.php
- src/Tracing/Cache/TraceableTagAwareCacheAdapterForV2.php
- src/Tracing/Doctrine/DBAL/TracingStatementForV2.php
- src/Tracing/Doctrine/DBAL/TracingDriverForV2.php
- tests/End2End/App
Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/Twig/TwigTracingExtension.php
Expand Up @@ -48,7 +48,7 @@ public function enter(Profile $profile): void
}

$spanContext = new SpanContext();
$spanContext->setOp('symfony.view');
$spanContext->setOp('view.render');
$spanContext->setDescription($this->getSpanDescription($profile));

$this->spans[$profile] = $transaction->startChild($spanContext);
Expand Down
4 changes: 4 additions & 0 deletions tests/End2End/App/Kernel.php
Expand Up @@ -44,6 +44,10 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
$loader->load(__DIR__ . '/deprecations_for_5.yml');
}

if (self::VERSION_ID >= 60000) {
$loader->load(__DIR__ . '/deprecations_for_6.yml');
}

if (interface_exists(MessageBusInterface::class) && self::VERSION_ID >= 40300) {
$loader->load(__DIR__ . '/messenger.yml');
}
Expand Down
1 change: 1 addition & 0 deletions tests/End2End/App/config.yml
@@ -1,4 +1,5 @@
sentry:
dsn: http://public@example.com/sentry/1
tracing:
enabled: true
options:
Expand Down
2 changes: 2 additions & 0 deletions tests/End2End/App/deprecations_for_6.yml
@@ -0,0 +1,2 @@
framework:
http_method_override: false
2 changes: 1 addition & 1 deletion tests/Tracing/Twig/TwigTracingExtensionTest.php
Expand Up @@ -58,7 +58,7 @@ public function testEnter(Profile $profile, string $spanDescription): void

$this->assertCount(2, $spans);
$this->assertNull($spans[1]->getEndTimestamp());
$this->assertSame('symfony.view', $spans[1]->getOp());
$this->assertSame('view.render', $spans[1]->getOp());
$this->assertSame($spanDescription, $spans[1]->getDescription());
}

Expand Down

0 comments on commit c6f52ec

Please sign in to comment.