Skip to content

Commit 24b7303

Browse files
committed
Merge branch '2.0.x' into 1.0.x
2 parents 9c8580e + 5440b75 commit 24b7303

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/Bridge/ContextInjector.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,6 @@ public function onRequest(GetResponseEvent $event)
122122
&& $request->headers->has($this->headerName)
123123
&& ($context = $this->registry[$this->format]->decode($request->headers->get($this->headerName)))) {
124124
$this->injectable->assign($context);
125-
126-
if ($request->server->has('REQUEST_TIME_FLOAT')) {
127-
$span = $this->tracer->start('symfony.start')
128-
->start((int)($request->server->get('REQUEST_TIME_FLOAT') * 1000000));
129-
$this->tracer->finish($span);
130-
}
131125
}
132126

133127
$this->spans->push(
@@ -139,8 +133,16 @@ public function onRequest(GetResponseEvent $event)
139133
new HttpUriTag($request->getRequestUri()),
140134
]
141135
)
136+
->start((int)($request->server->get('REQUEST_TIME_FLOAT', time()) * 1000000))
142137
);
143138

139+
if (HttpKernelInterface::MASTER_REQUEST === $event->getRequestType()) {
140+
$span = $this->tracer
141+
->start('app.start')
142+
->start((int)($request->server->get('REQUEST_TIME_FLOAT', time()) * 1000000));
143+
$this->tracer->finish($span);
144+
}
145+
144146
return $this;
145147
}
146148
}

0 commit comments

Comments
 (0)