Skip to content

Commit 3c29011

Browse files
Merge branch '6.2' into 6.3
* 6.2: (25 commits) Bump Symfony version to 6.2.7 Update VERSION for 6.2.6 Update CHANGELOG for 6.2.6 Bump Symfony version to 5.4.21 Update VERSION for 5.4.20 Update CHANGELOG for 5.4.20 [HttpFoundation] Fix bad return type in IpUtils::checkIp4() [DependencyInjection] Fix order of arguments when mixing positional and named ones [HttpClient] Fix collecting data non-late for the profiler [Security/Http] Fix compat of persistent remember-me with legacy tokens Bump Symfony version to 6.2.6 Update VERSION for 6.2.5 Update CHANGELOG for 6.2.5 Bump Symfony version to 6.1.12 Update VERSION for 6.1.11 Update CHANGELOG for 6.1.11 Bump Symfony version to 6.0.20 Update VERSION for 6.0.19 Update CHANGELOG for 6.0.19 Bump Symfony version to 5.4.20 ...
2 parents 1d08605 + 6efa9a7 commit 3c29011

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

DataCollector/HttpClientDataCollector.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,28 @@ public function registerClient(string $name, TraceableHttpClient $client)
3838

3939
public function collect(Request $request, Response $response, \Throwable $exception = null)
4040
{
41+
$this->lateCollect();
4142
}
4243

4344
public function lateCollect()
4445
{
45-
$this->reset();
46+
$this->data['request_count'] = 0;
47+
$this->data['error_count'] = 0;
48+
$this->data += ['clients' => []];
4649

4750
foreach ($this->clients as $name => $client) {
4851
[$errorCount, $traces] = $this->collectOnClient($client);
4952

50-
$this->data['clients'][$name] = [
51-
'traces' => $traces,
52-
'error_count' => $errorCount,
53+
$this->data['clients'] += [
54+
$name => [
55+
'traces' => [],
56+
'error_count' => 0,
57+
],
5358
];
5459

60+
$this->data['clients'][$name]['traces'] = array_merge($this->data['clients'][$name]['traces'], $traces);
5561
$this->data['request_count'] += \count($traces);
56-
$this->data['error_count'] += $errorCount;
62+
$this->data['error_count'] += $this->data['clients'][$name]['error_count'] += $errorCount;
5763

5864
$client->reset();
5965
}

0 commit comments

Comments
 (0)