You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Symfony version(s) affected
5.3.11
Description
HTTP client created using
withOptions
isn't properly tracked in profiler.How to reproduce
withOptions([])
.Possible Solution
I temporally worked around this issue by manually calling
registerClient
of injected servicedata_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'swithOptions
section call register on data collector.Additional Context
No response
The text was updated successfully, but these errors were encountered: