Lookout
000 015 030 045 060 075 090 105 120 135 150 165 180 195 210 225 240 255 270 285 300 315 330 345 360
3 min read Tom Shafer

Monitoring outbound HTTP calls and third-party APIs in Laravel

Monitoring HTTP requests in Laravel catches the slow Stripe call and flaky APIs dragging your app down. See every outbound call's timing and errors.

Your app is slow, but your code is fast. Sound familiar? Nine times out of ten the culprit isn't your controller — it's the payment gateway taking three seconds to respond, the geocoding API timing out, or the webhook you fire on every save quietly retrying in the background. Monitoring HTTP requests in Laravel means watching the calls your app makes, not just the ones it receives. Without that visibility, a third-party outage looks exactly like a bug in your code, and you waste an afternoon profiling the wrong thing. This post walks through what to track for outbound calls and how to get it flowing in a couple of minutes.

Why outbound calls are your blind spot

You probably already log incoming requests. But every Http::get(), every SDK that wraps a REST API, every queued job that calls Stripe or SendGrid is a dependency you don't control. When one of them degrades, the symptoms surface in your app: slow pages, piled-up queues, timeouts. The request that matters happened on someone else's server, and your logs never saw it. That gap is where on-call hours go to die.

What to actually monitor

For each outbound call, you want four things:

  • Duration — how long the call took, so you can spot the gateway that crept from 200ms to 2s.
  • Status — 2xx vs 4xx vs 5xx, and timeouts (which are worse than any status code).
  • Host/endpoint — grouped, so "the maps API" is one line, not a thousand.
  • Failure context — the request that triggered it and what came back.

A timeout that happens 0.5% of the time is invisible in averages but obvious the moment you can see the slow tail.

Getting it into Lookout

Lookout has a watcher for outbound HTTP, so you don't instrument calls by hand. Install the package from your Laravel app root:

composer require lookout/tracing
php artisan lookout:install

Then point it at your project with two env values:

LOOKOUT_LARAVEL=true
LOOKOUT_API_KEY=your-project-api-key
LOOKOUT_URL=https://your-lookout-host.example.com

The service provider is auto-discovered. From there, outbound calls made through Laravel's HTTP client show up with their timing and status, stitched into the request or job that made them — so a slow page tells you which third party slowed it down.

Turn slow dependencies into one alert

Seeing the data is half the win; the other half is hearing about it before customers do. Set an alert rule on a threshold over a 1h or 24h window and route it to Email or Slack. Now a spike in failed calls to a single provider pages you once — not on every individual timeout. That's the difference between "the payment API is down" arriving as a calm heads-up versus a flood of noise nobody reads.

A quick mental model

Treat every external dependency as a service with its own error budget. If the shipping API is allowed to fail 1% of the time and it's failing 8%, that's a conversation with the vendor — backed by data, not a hunch. Monitoring outbound HTTP requests in Laravel turns "their API feels flaky" into a number you can act on.

Your app is only as reliable as the services it leans on. Make those services visible, and the next mystery slowdown solves itself in minutes instead of hours. Create a free Lookout project — 10,000 events a month, one project, no credit card — point it at your app, and watch your outbound calls light up with timing and errors the first time something downstream hiccups.

laravel http observability performance