8p / EightPointsGuzzleBundle

⛽️ Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony
MIT License
440 stars 71 forks source link

No information in Guzzle Profiler tab #313

Closed Starojitski closed 2 years ago

Starojitski commented 3 years ago

image

At least 5 guzzle requests were executed but none are shown. Configured like this:

eight_points_guzzle:
    logging: '%kernel.debug%'
    profiling: '%kernel.debug%'
    clients:
        default:
            lazy: true
            options:
                http_errors: false

Any advice would be appreciated

Q A
Symfony version 4.4.32
Bundle version 8.2.0
rpkamp commented 2 years ago
  1. What is the value of %kernel.debug%
  2. Are you indeed injecting the @eight_points_guzzle.client.default into services that require a Guzzle Client or are you creating (a) Guzzle client(s) elsewhere?
florianpreusner commented 2 years ago

Closing issue because of missing additional information. Thanks for helping out @rpkamp 🙌

nuryagdym commented 1 year ago

I am facing the same issue,

When I make a request using default client @eight_points_guzzle.client.default_client it works, I can see guzzle request in symfony profiler.

Problem is with custom clients that I configured. Example:

eight_points_guzzle:
  logging: true
  clients:
    default_client:
      options:
        timeout: 10
        headers:
          content-type: 'application/json'

    custom_client:
      logging: true # I tried by adding here also
      base_url: 'https://mydomain'
      options:
        headers:
          content-type: 'application/json'

composer: "eightpoints/guzzle-bundle": "^8.4",