Skip to content

Commit c0be528

Browse files
committed
Merge branch '2.0.x' into 1.0.x
2 parents d0ed737 + dc9c6e1 commit c0be528

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/Bridge/ContextInjector.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Jaeger\Tracer\InjectableInterface;
66
use Symfony\Component\Console\ConsoleEvents;
77
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
8+
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
89
use Symfony\Component\HttpKernel\KernelEvents;
910

1011
class ContextInjector implements EventSubscriberInterface
@@ -24,8 +25,8 @@ public function __construct(
2425
public static function getSubscribedEvents()
2526
{
2627
return [
27-
ConsoleEvents::COMMAND => ['onCommand', 1024],
28-
KernelEvents::REQUEST => ['onRequest', 1024],
28+
ConsoleEvents::COMMAND => ['onCommand', 4096],
29+
KernelEvents::REQUEST => ['onRequest', 4096],
2930
];
3031
}
3132

@@ -44,8 +45,12 @@ public function inject()
4445
return $this;
4546
}
4647

47-
public function onRequest()
48+
public function onRequest(GetResponseEvent $event)
4849
{
50+
if (false === $event->isMasterRequest()) {
51+
return $this;
52+
}
53+
4954
return $this->inject();
5055
}
5156
}

src/Context/Extractor/EnvContextExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function extract()
4646
public static function getSubscribedEvents()
4747
{
4848
return [
49-
ConsoleEvents::COMMAND => ['onCommand', 2048],
49+
ConsoleEvents::COMMAND => ['onCommand', 8192],
5050
];
5151
}
5252

src/Context/Extractor/HeaderContextExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function extract()
4747
public static function getSubscribedEvents()
4848
{
4949
return [
50-
KernelEvents::REQUEST => ['onRequest', 2048],
50+
KernelEvents::REQUEST => ['onRequest', 8192],
5151
];
5252
}
5353

0 commit comments

Comments
 (0)