Skip to main content
The SDK’s contract is fail-open, always: if Glassray is down, slow, or misconfigured - or the SDK itself has a bug - the worst case is lost telemetry. Your agent is never blocked, never slowed on the critical path, and never crashed by tracing.

The guarantees

  • Every public method is internally guarded; SDK errors go to a rate-limited warning (or your onWarn), and your return value or exception passes through untouched.
  • A missing or invalid API key disables sending, not your agent.
  • No timer or socket ever holds the process open - everything is unref’d.
  • Invalid configuration warns and disables; it never throws.
  • The SDK sends nothing but your traces - zero phone-home.

Delivery model

A trace is buffered in memory while it runs and POSTed once, when its root settles - on success or on throw. One trace, one request, off the critical path. This matches the ingest contract (whole trace per request - see Bring your own OTel for why that matters).

The bounds

Documented because the numbers are the trust signal - this is exactly how much memory, time, and retry traffic the SDK will ever cost you: Everything dropped is accounted for:

Serverless

Because a trace POSTs at root settle, a long-lived process needs nothing. Platforms that freeze or kill the process right after the response need one flush call:
Traces cut off mid-run or missing entirely on serverless is almost always a missing flush - it’s the first item on the troubleshooting checklist.