Agents in production

Platform integration

How to monitor third party API integrations without waiting for the outage

How to monitor third party API integrations: synthetic checks, 429 rate limit tracking, SLA measurement, schema drift detection, and alert routing that works.

8 minute read
Decorative imagery showcasing Pontil's brand

Third party API integrations fail quietly. A vendor tightens a rate limit at 3am, a schema field goes optional, an OAuth refresh starts returning 401s for a subset of users — and your first signal is a support ticket two days later. By then the queue is backed up, the agent is retrying the same broken call in a loop, and someone is asking why nobody noticed.

This guide walks through a monitoring setup that catches those failures before customers do. By the end you'll have synthetic checks, per-endpoint error tracking, rate limit dashboards, SLA measurement, and drift detection wired into one view. Prerequisites: an existing integration codebase, an observability tool that accepts custom metrics (Datadog, Grafana, Honeycomb, or similar), and about a day to wire it up.

Step 1 — Separate outbound calls from inbound traffic in your telemetry

Most teams start with a single "errors" dashboard that mixes their own API errors with third-party ones. That's the first thing to fix. When a partner degrades, you need to see it without hunting.

Tag every outbound call with the vendor name, endpoint, and integration purpose. In practice that means wrapping your HTTP client so every request emits a metric like:

http_client.request.duration{
 vendor="stripe",
 endpoint="/v1/charges",
 method="POST",
 purpose="invoice_capture"
}

Do the same for status codes and response sizes. The purpose tag matters more than it looks — you'll thank yourself the first time you need to answer "is the billing integration broken, or just the reporting one?" without grepping through code.

Once the tags are in place, build one dashboard per vendor. Don't try to make a universal integrations dashboard. Vendors fail differently and you'll compare apples to oranges.

Step 2 — Add synthetic checks against every vendor's critical path

Real traffic is a bad monitor because it's uneven. If a low-volume endpoint breaks at 2am, you won't see it until the morning batch runs. Synthetic checks fix that.

For each vendor, pick two or three calls that represent the integration's actual work — not a health check endpoint the vendor gave you, because vendor health endpoints famously lie. If you sync contacts, run a read against a known test record every five minutes. If you post invoices, do a dry-run create against a sandbox tenant every fifteen.

Run the checks from your production network, not a synthetic-monitoring vendor's boxes. Vendor allowlists, IP-based rate limits, and TLS quirks only show up from the environment that matters.

Alert on two conditions: the check failed, or the p95 latency doubled over a one-hour window. The second one catches the slow degradation that eventually becomes an outage.

Step 3 — Track 429s as a first-class signal, not an error

A 429 response isn't a bug. It's the vendor telling you your consumption plan and your usage no longer agree. Treat it that way in your monitoring.

Emit a separate counter for rate-limit responses, tagged with vendor and endpoint. Then build two views:

  1. Absolute 429 count over time, per endpoint. A slow climb over days means a customer's usage is growing into the ceiling. A cliff means the vendor changed the limit.
  2. 429 rate as a percentage of successful calls. This normalises for traffic spikes so a Black Friday surge doesn't look like a monitoring incident.

Also capture the Retry-After header when the vendor sends one. A shift from three seconds to sixty is a strong signal the vendor's backend is under load — worth knowing before your retry storm makes it worse. The rate limiting patterns most SaaS APIs use determine what "normal" looks like here; sliding window limits behave very differently from token buckets in the tail.

Set a soft alert at 1% 429 rate and a hard alert at 5%. Below 1%, retries with jitter absorb it. Above 5%, work is genuinely being lost.

Step 4 — Measure the SLA you actually care about, not the one in the contract

Vendor SLAs read like "99.9% availability measured monthly, excluding scheduled maintenance and force majeure." That number is useless for operating an integration. What you need is the SLA your integration experiences from your users' perspective.

Define two metrics per vendor:

  • Effective availability: successful business outcomes / attempted business outcomes over a rolling seven days. "Successful" means the call returned a 2xx and the response was usable, not just that TCP completed.
  • User-perceived latency: p95 of the full outbound call including your retries, backoff, and any circuit-breaker wait time.

Both are easy to compute if Step 1 is done: they're derived views over the same tagged metrics. Publish them somewhere the integration owner sees them weekly. If a vendor's contractual SLA is 99.9% and your effective availability is 99.3%, you have a conversation to have — probably about retries and error handling on your side, sometimes about the vendor's actual reliability.

A regular table of what to measure and why:

Metric
What it tells you
Alert threshold

Effective availability (7d)

Business impact of vendor issues

Below 99.5%

p95 latency (1h)

Slow degradation

Doubling over baseline

429 rate

Quota pressure or vendor squeeze

Above 1% soft, 5% hard

5xx rate

Vendor-side incidents

Above 0.5%

Auth failure rate

Token refresh or scope drift

Any sustained trend

Step 5 — Watch for silent schema drift

The worst third-party API failures don't return errors. The vendor renames a field, changes a field's type from string to object, or starts returning null in a place that used to always have a value. Your integration keeps returning 200s and quietly loses data.

Two things catch this:

  1. Response validation on a sample of production traffic. Validate 1–5% of responses against a schema you control (JSON Schema, Zod, Pydantic — whatever). Emit a metric on validation failures. Never fail the request on validation errors; you're monitoring, not enforcing.
  2. Daily snapshot diffs against a canary account. Hit a small set of endpoints from a monitoring worker, store the response shape, and diff it against yesterday's. Alert on new fields, removed fields, or changed types.

This is the same discipline covered in more depth in detecting API breaking changes — the difference is you don't own this API, so you can't rely on the vendor's changelog or a CI check against their OpenAPI spec. Sometimes vendors don't have one. Sometimes it's out of date. The runtime diff is the only source of truth.

Schema drift is also where connector maintenance quietly compounds into a large ongoing cost — monitoring is cheaper than the incident it prevents.

Step 6 — Instrument auth and token refresh separately

OAuth failures are their own category. They correlate with user activity, they cluster around token expiry windows, and they often affect a subset of users rather than everyone. If you bury 401s inside your general error rate, you'll miss the pattern.

Emit a distinct metric for auth outcomes: token refresh attempts, token refresh failures, calls returning 401 after a successful refresh (the worst kind — usually a scope or consent problem), and calls failing because no token exists. Tag by vendor and by user or tenant.

Build an alert on the ratio of failed refreshes to attempted refreshes. A vendor rotating signing keys, changing token TTLs, or deprecating a scope shows up here first. The details of what OAuth actually guarantees at runtime enforcement are worth understanding before designing this — the shape of failures depends on the auth model.

Step 7 — Route alerts to the person who can fix them

Monitoring only pays off if someone acts on the signals. The default pattern — every alert goes to the on-call engineer — doesn't work for third-party integrations, because most of the time the on-call can't do anything except open a vendor ticket.

Route alerts by kind:

  • 5xx and latency spikes → on-call, because retries and circuit breakers might need tuning.
  • 429 rate climbs → integration owner, because it's usually a capacity conversation with the vendor.
  • Auth failures → integration owner and security, because scopes and consent are involved.
  • Schema drift → integration owner, because code changes are almost always required.

Include a runbook link in every alert. "Vendor X returning 5xx" should link to a page that lists the vendor's status page, your contact there, the retry configuration, and the last three times this happened. Save your on-call from being an archaeologist.

Common pitfalls

Alerting on absolute counts instead of rates. "More than 100 errors per minute" fires on Monday morning traffic peaks and misses weekend outages. Always use rates or percentages, with a minimum volume floor to suppress noise on low-traffic endpoints.

Trusting vendor status pages. They're often updated hours after the incident and sometimes not at all for regional or account-scoped issues. Your own synthetic checks are the source of truth.

One dashboard for all integrations. Vendors fail in distinct ways. A universal dashboard hides the pattern. One per vendor, one summary view rolling them up.

Retrying without observability. Aggressive retry logic can double a partner outage into a self-inflicted incident and mask the underlying failure rate. Emit metrics for retry attempts separately from initial attempts, and never let retries hide a rising error rate from your dashboards. This connects directly to how circuit breakers and retry patterns should be scoped — the monitoring only works if the resilience layer isn't lying to it.

Ignoring the maintenance load. Every check, alert, and dashboard is code you own. Budget time quarterly to prune dead checks, update thresholds against current baselines, and delete integrations you no longer use.

Join our weekly newsletter

Stay up to date on the ever changing agentic landscape.

POSTS

Related content

Platform integration

Agents in production

Third party API change management is the tax nobody put on the roadmap

6 minute read

Platform integration

Agents in production

Third party API integration best practices when agents are the consumer

8 minute read

Agent infrastructure

API strategy

Circuit breaker pattern for APIs: a practical guide for agent-era systems

7 minute read