The same monitoring for a service in any language
Midline takes events over plain HTTP, so a Django, FastAPI, Go, Java, PHP, Rails or .NET service reports exactly what an Express service does. Choose the proxy for no code changes, or the ingest API for full control.
Option 1: the reverse proxy, no code changes
Run the Midline proxy in front of the API and point clients at it. It forwards each request, records the exchange and reports failures. It needs Node.js on the machine that runs the proxy, but not in your service.
- It forwards method, path, query, headers and body, streaming both ways.
- It answers 502 if the destination is unreachable, 504 if it is too slow and 413 if the body is too large. Error bodies carry a request id and no internal detail.
- It only retries a GET, HEAD or OPTIONS that never reached your API. A write is never replayed.
- It only accepts origin-form request lines, so it cannot be used as an open forward proxy.
- WebSocket upgrades are not proxied.
Option 2: post events from your own code
The ingest API accepts one event or a batch of up to 500. Send it off the request path, so a user never waits on telemetry. Mask sensitive fields in your own process first: nothing you do not send can be stored.
- Required: eventType and route.
- Optional: method, statusCode, responseTime, severity, category, service, environment, release, timestamp, requestId, correlationId, traceId, sessionId, payload and metadata.
Which one to pick
Choose the proxy when you cannot or do not want to touch the service, or want every route covered at once. Choose the ingest API when you want to report custom events, business events or errors caught inside your own code.
curl -X POST https://api.usemidline.com/api/api-monitor/events \
-H "Content-Type: application/json" \
-H "X-API-Key: $MIDLINE_API_KEY" \
-d '{
"eventType": "error",
"service": "checkout-api",
"route": "/v1/charges",
"method": "POST",
"statusCode": 500,
"responseTime": 1240,
"severity": "critical",
"category": "application",
"payload": { "error": "Database connection failed" }
}'
Questions
Does Midline only work with Node.js?
No. The Node agent is a convenience. Any service can report over plain HTTP, and the reverse proxy sits in front of an API written in any language.
How do I monitor a Django or FastAPI app?
Either run the Midline proxy in front of it, or post events to the ingest endpoint from your code. Do it in a background thread or task so users never wait on telemetry.
How many events can I send at once?
Up to 500 in a single batch request.
Is there a mobile SDK?
Not yet. Mobile SDKs are planned. A server key must never ship inside an app binary, so Midline does not offer a copy-paste workaround.
Other backends · Ingest API · Node.js agent
Start free