-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to see server side http requests that take place within ajax calls? #745
Comments
Definitely should not expect to see those requests in QM. You could use QM's profiling feature around the request, but that will only show time and memory. |
Thank you for the response! Can you elaborate on what it is about those requests that makes them impossible for QM to see?
I am interested in profiling them for sure. Could you point me to any docs for that? |
It is because the requests are made without using WP helper functions (ex: If you review the collector for the HTTP data, you'll see it connects to several WordPress hooks to watch for and gather data on HTTP requests. You may learn some things by reading the docs on querymonitor.com. Here's the specific blog post on profiling: |
Now I'm tempted to tamper with the stripe sdk and make it use wp_remote_() just so I can use QM 🤣 |
You certainly could, but if you updated Stripe's PHP SDK version, you'd have to do it over again. It's probably more pain than it's worth, but that's ultimately your judgement. |
oh for sure, I just meant on staging to do some performance debugging here. |
Most SDK use well-known libs themselves, such as Guzzle. Could identify the lib, and write a simple QM integration plugin for it. Although https://github.com/stripe/stripe-php/blob/master/composer.json seems to indicate they're using |
Over the years I've spent quite a bit of time investigating whether QM could automatically detect HTTP requests made with Guzzle or directly with Curl without having access to a variable that holds the instance or the handle. It's just not possible without using PHP ticks, which are way too resource intensive to use. I have thought about writing a QM connector for Guzzle and Curl but the majority of the time it would still rely on a) a user realising that a plugin is doing such requests, and then b) some sort of modification to the plugin to expose its Guzzle instance or Curl handle. |
Hello, I have the following setup...
To complicate matters, the http request to stripe is via their official php sdk, which obviously does not use wp_remote_*() and I'm treating as a black box I don't want to tamper with.
In any event, I don't see the server side http calls in query monitor. Should I expect to? Is there a way to? Some of my stripe calls seem to be taking a long time and I'd like to do some performance debugging.
The text was updated successfully, but these errors were encountered: