-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hello, I found a bug in
zipkin-instrumentation-symfony/src/ZipkinBundle/TracingFactory.php
Lines 50 to 65 in 2afea47
| private static function buildReporter(ContainerInterface $container) | |
| { | |
| $reporterName = $container->getParameter('zipkin.reporter.type'); | |
| switch ($reporterName) { | |
| default: | |
| case 'log': | |
| $logger = $container->get('logger'); | |
| return new Log($logger); | |
| case 'noop': | |
| return new Noop(); | |
| break; | |
| case 'http': | |
| return new Http($container->getParameter('zipkin.reporter.http') ?: []); | |
| } | |
| } |
I was using the Http reporter but configured it with wrong URL. This case is handled by the reporter and logged into logger. However here you're creating the reporter without passing the logger service so NullLogger is used instead and the errors are thrown away.
Also using $logger = $container->get('logger'); is a bad idea. I tried and it failed with this:
[critical] Uncaught Exception: The "logger" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.
Metadata
Metadata
Assignees
Labels
No labels