Skip to content

Commit b55e08e

Browse files
committed
Merge branch '2.0.x' into 1.0.x
# Conflicts: # src/Bridge/ContextInjector.php # src/Context/Extractor/ContextExtractorInterface.php # src/Context/Extractor/EnvContextExtractor.php # src/Context/Extractor/HeaderContextExtractor.php
2 parents ca9f645 + 629179d commit b55e08e

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/Bridge/ContextInjector.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ public static function getSubscribedEvents()
2929
];
3030
}
3131

32+
public function onCommand()
33+
{
34+
return $this->inject();
35+
}
36+
3237
public function inject()
3338
{
3439
if (null === ($context = $this->extractor->extract())) {
@@ -39,11 +44,6 @@ public function inject()
3944
return $this;
4045
}
4146

42-
public function onCommand()
43-
{
44-
return $this->inject();
45-
}
46-
4747
public function onRequest()
4848
{
4949
return $this->inject();

src/Bridge/RequestSpanListener.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,6 @@ public static function getSubscribedEvents()
3939
];
4040
}
4141

42-
public function getOperationName(Request $request)
43-
{
44-
if (null !== ($fragment = $request->attributes->get('is_fragment'))) {
45-
return ($controller = $request->attributes->get('_controller', null))
46-
? sprintf('fragment.%s', $controller)
47-
: 'fragment';
48-
}
49-
50-
if (null === ($routeName = $request->attributes->get('_route', null))) {
51-
return $request->getRequestUri();
52-
}
53-
54-
return $routeName;
55-
}
56-
5742
public function onResponse(FilterResponseEvent $event)
5843
{
5944
if ($this->spans->isEmpty()) {
@@ -100,4 +85,19 @@ public function onRequest(GetResponseEvent $event)
10085

10186
return $this;
10287
}
88+
89+
public function getOperationName(Request $request)
90+
{
91+
if (null !== ($fragment = $request->attributes->get('is_fragment'))) {
92+
return ($controller = $request->attributes->get('_controller', null))
93+
? sprintf('fragment.%s', $controller)
94+
: 'fragment';
95+
}
96+
97+
if (null === ($routeName = $request->attributes->get('_route', null))) {
98+
return $request->getRequestUri();
99+
}
100+
101+
return $routeName;
102+
}
103103
}

0 commit comments

Comments
 (0)