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

FriendsOfOpenTelemetry / opentelemetry-bundle / 13331826996

14 Feb 2025 03:03PM UTC coverage: 91.162% (+2.4%) from 88.719%
13331826996

push

github

gaelreyrol
feat(Instrumentation/HttpKernel): exclude paths from being traced when instrumentation type is auto

28 of 29 new or added lines in 5 files covered. (96.55%)

2166 of 2376 relevant lines covered (91.16%)

33.08 hits per line

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

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

3
namespace FriendsOfOpenTelemetry\OpenTelemetryBundle\DependencyInjection\Compiler;
4

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

8
class SetHttpKernelTracingExcludePathsPass implements CompilerPassInterface
9
{
10
    public function process(ContainerBuilder $container): void
11
    {
12
        if (false === $container->hasParameter('open_telemetry.instrumentation.http_kernel.tracing.exclude_paths')) {
36✔
13
            return;
30✔
14
        }
15

16
        if (false === $container->hasDefinition('open_telemetry.instrumentation.http_kernel.trace.event_subscriber')) {
6✔
NEW
17
            return;
×
18
        }
19

20
        $excludePaths = $container->getParameter('open_telemetry.instrumentation.http_kernel.tracing.exclude_paths');
6✔
21
        $container->getDefinition('open_telemetry.instrumentation.http_kernel.trace.event_subscriber')
6✔
22
            ->addMethodCall('setExcludePaths', [$excludePaths]);
6✔
23
    }
24
}
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

© 2025 Coveralls, Inc