Skip to content

Commit e614b8d

Browse files
committed
Fixed subrequest interaction
1 parent 5440b75 commit e614b8d

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/Bridge/ContextInjector.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,22 @@ public function onRequest(GetResponseEvent $event)
124124
$this->injectable->assign($context);
125125
}
126126

127-
$this->spans->push(
128-
$this->tracer
129-
->start(
130-
$this->getOperationName($request),
131-
[
132-
new HttpMethodTag($request->getMethod()),
133-
new HttpUriTag($request->getRequestUri()),
134-
]
135-
)
136-
->start((int)($request->server->get('REQUEST_TIME_FLOAT', time()) * 1000000))
127+
$requestSpan = $this->tracer->start(
128+
$this->getOperationName($request),
129+
[
130+
new HttpMethodTag($request->getMethod()),
131+
new HttpUriTag($request->getRequestUri()),
132+
]
137133
);
138134

139135
if (HttpKernelInterface::MASTER_REQUEST === $event->getRequestType()) {
136+
$requestSpan->start((int)($request->server->get('REQUEST_TIME_FLOAT', time()) * 1000000));
140137
$span = $this->tracer
141138
->start('app.start')
142139
->start((int)($request->server->get('REQUEST_TIME_FLOAT', time()) * 1000000));
143140
$this->tracer->finish($span);
144141
}
142+
$this->spans->push($requestSpan);
145143

146144
return $this;
147145
}

0 commit comments

Comments
 (0)