File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 5
5
use Jaeger \Tracer \InjectableInterface ;
6
6
use Symfony \Component \Console \ConsoleEvents ;
7
7
use Symfony \Component \EventDispatcher \EventSubscriberInterface ;
8
+ use Symfony \Component \HttpKernel \Event \GetResponseEvent ;
8
9
use Symfony \Component \HttpKernel \KernelEvents ;
9
10
10
11
class ContextInjector implements EventSubscriberInterface
@@ -24,8 +25,8 @@ public function __construct(
24
25
public static function getSubscribedEvents ()
25
26
{
26
27
return [
27
- ConsoleEvents::COMMAND => ['onCommand ' , 1024 ],
28
- KernelEvents::REQUEST => ['onRequest ' , 1024 ],
28
+ ConsoleEvents::COMMAND => ['onCommand ' , 4096 ],
29
+ KernelEvents::REQUEST => ['onRequest ' , 4096 ],
29
30
];
30
31
}
31
32
@@ -44,8 +45,12 @@ public function inject()
44
45
return $ this ;
45
46
}
46
47
47
- public function onRequest ()
48
+ public function onRequest (GetResponseEvent $ event )
48
49
{
50
+ if (false === $ event ->isMasterRequest ()) {
51
+ return $ this ;
52
+ }
53
+
49
54
return $ this ->inject ();
50
55
}
51
56
}
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public function extract()
46
46
public static function getSubscribedEvents ()
47
47
{
48
48
return [
49
- ConsoleEvents::COMMAND => ['onCommand ' , 2048 ],
49
+ ConsoleEvents::COMMAND => ['onCommand ' , 8192 ],
50
50
];
51
51
}
52
52
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function extract()
47
47
public static function getSubscribedEvents ()
48
48
{
49
49
return [
50
- KernelEvents::REQUEST => ['onRequest ' , 2048 ],
50
+ KernelEvents::REQUEST => ['onRequest ' , 8192 ],
51
51
];
52
52
}
53
53
You can’t perform that action at this time.
0 commit comments