Closed
Description
Symfony version(s) affected
5.3.11
Description
HTTP client created using withOptions
isn't properly tracked in profiler.
How to reproduce
- Inject HTTPClientInterface to a service or a controller.
- Make a new instance of HTTPClientInterface by calling
withOptions([])
. - Make requests using newly created HTTP Client.
- Take note that client logs it's requests under log, but it's requests aren't tracked by HTTP client profiler section.
Possible Solution
I temporally worked around this issue by manually calling registerClient
of injected service data_collector.http_client
. But said service is not available under production, so my work around had to be removed before deployment.
Other solution is to add a reference to data collector in TraceableHttpClient
and in it's withOptions
section call register on data collector.
Additional Context
No response