outboundiq/outboundiq-php

Track and monitor outgoing API calls in PHP applications

Maintainers

Package info

github.com/outboundiq-hq/outboundiq-php

Homepage

pkg:composer/outboundiq/outboundiq-php

Statistics

Installs: 1 013

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2026-01-19 12:50 UTC

This package is auto-updated.

Last update: 2026-02-19 13:09:18 UTC


README

Track and monitor your outgoing API calls with zero effort.

Installation

composer require outboundiq/outboundiq-php

Quick Start

  1. Get your API key from OutboundIQ Dashboard

  2. Initialize the package:

require_once 'vendor/autoload.php';

outboundiq_init('your-api-key');

That's it. OutboundIQ will automatically track all HTTP requests made via cURL, Guzzle, or file_get_contents().

Configuration

$client = outboundiq_init('your-api-key', [
    'enabled' => true,           // Toggle monitoring on/off
    'batch_size' => 50,          // Metrics to batch before sending
    'timeout' => 5,              // Request timeout in seconds
    'retry_attempts' => 3,       // Retry failed submissions
    'transport' => 'async',      // 'async', 'sync', or 'queue'
    'url' => 'https://agent.outboundiq.dev/api/metric', // Custom endpoint (optional)
]);

Transport Options

Transport Best For How It Works
async Traditional servers (Forge, DigitalOcean) Background curl process
sync Serverless (Vapor, Lambda) Blocking curl request
queue Laravel apps Dispatches to queue job

Using with Guzzle

use OutboundIQ\Interceptors\GuzzleMiddleware;

$client = new GuzzleHttp\Client([
    'handler' => GuzzleMiddleware::getHandlerStack()
]);

$response = $client->get('https://api.stripe.com/v1/charges');

SDK Methods

Check Provider Status

$status = $client->providerStatus('stripe');
// Returns health status, active incidents, recommendations

Get Recommendations

$recommendation = $client->recommend('payment-service');
// Returns which provider to use based on current health

Check Endpoint Status

$status = $client->endpointStatus('stripe-charges');
// Returns metrics for a specific endpoint

Environment Variable

Set OUTBOUNDIQ_KEY in your environment and the package will auto-initialize:

export OUTBOUNDIQ_KEY=your-api-key

Requirements

  • PHP 8.2+
  • ext-curl
  • ext-json

License

MIT