• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FriendsOfOpenTelemetry / opentelemetry-bundle / 12749780698

13 Jan 2025 02:51PM UTC coverage: 88.509% (-0.3%) from 88.791%
12749780698

Pull #107

github

web-flow
Merge 446412ad1 into 0b41a5c51
Pull Request #107: refactor(DependencyInjection): move configurate in compiler passes

71 of 92 new or added lines in 11 files covered. (77.17%)

2018 of 2280 relevant lines covered (88.51%)

6.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/src/DependencyInjection/Compiler/TwigInstrumentationPass.php
1
<?php
2

3
namespace FriendsOfOpenTelemetry\OpenTelemetryBundle\DependencyInjection\Compiler;
4

5
use Symfony\Bundle\TwigBundle\TwigBundle;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8

9
class TwigInstrumentationPass implements CompilerPassInterface
10
{
11
    public function process(ContainerBuilder $container): void
12
    {
13
        if (false === $container->hasParameter('open_telemetry.instrumentation.twig.tracing.enabled')
7✔
14
            || false === $container->getParameter('open_telemetry.instrumentation.twig.tracing.enabled')) {
7✔
15
            return;
6✔
16
        }
17

18
        if (!class_exists(TwigBundle::class)) {
1✔
NEW
19
            throw new \LogicException('Twig instrumentation cannot be enabled because the symfony/twig-bundle package is not installed.');
×
20
        }
21

22
        $container->getDefinition('open_telemetry.instrumentation.twig.trace.extension')
1✔
23
            ->addTag('twig.extension');
1✔
24
    }
25
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc