DebugBundle
SDKs

SDKs

Capture production errors, logs, and context from any runtime. DebugBundle SDKs share a universal interface across all languages.

DebugBundle SDKs are lightweight, zero-config libraries that capture exceptions, logs, HTTP context, and diagnostic probes at runtime and ship them to DebugBundle for processing into debug bundles.

Universal Interface

Every SDK implements the same public API, regardless of language:

MethodPurpose
init(config)Initialize the SDK with project token, environment, and options
captureException(error)Capture an exception with full stack trace and context
captureError(error)Required convenience alias for captureException
captureLog(message, level)Capture a structured log entry
captureMessage(message)Capture a message (delegates to captureLog with "info" level)
captureRequest(req, res)Capture an HTTP request/response pair
setContext(key, value)Set persistent context that attaches to all future events
probe(label, data)Buffer diagnostic data in an always-on ring buffer
flush()Force-send all buffered events

Safety Guarantees

All SDKs follow the same safety contract:

  • Never throw uncaught exceptions into your code
  • Never block the request/response cycle
  • Never crash the host process
  • No side effects on import — only init() activates the SDK
  • Graceful degradation — if the buffer fills, events are dropped silently
  • Redaction before transmission — sensitive fields are scrubbed before any data leaves the process

V1 Parity Matrix

CapabilityNode.jsBrowserPythonPHPWordPressJava.NETGoRubyAndroidiOSReact Native
StatusShippedShippedShippedShippedShipped via GitHub ReleasesShippedReleased v1.1.1ShippedShippedReleased v1.1.0Released v0.1.1Released v1.1.0
Package@debugbundle/sdk-node@debugbundle/sdk-browserdebugbundle-pythondebugbundle/sdk-phpdebugbundle-wordpressMaven com.debugbundle modulesNuGet DebugBundle.Sdk plus DebugBundle.* integrationsgithub.com/debugbundle/debugbundle-godebugbundleMaven com.debugbundle Android moduleshttps://github.com/debugbundle/debugbundle-swift / CocoaPods DebugBundle@debugbundle/sdk-react-native
Unhandled exceptionsYesYesYesYesYes, through PHP SDKYesYesYesYesYes, next-launch crash replayBounded next-launch crash replay helpersYes, global JS hooks plus native crash handoff
Handled exception captureYesYesYesYesYes, through PHP SDKYesYesYesYesYesYesYes
Request 5xx incident captureYesYesYesYesYesYesYesYesYesYes, OkHttp/KtorYes, URLSession/AlamofireYes, fetch/XHR
Browser first-party 5xx promotionN/AYesN/AN/AYes, through browser SDKN/AN/AN/AN/AN/AN/AN/A
BreadcrumbsNoYesNoNoYes, through browser SDKNoNoNoNoYes, screen/app/networkYes, screen/app/networkYes, React Navigation/app/network/action
Relay supportFull relay handler + adaptersRelay client pathFull relay handlerFull relay handlerWordPress REST relaySpring Boot and servlet relay routesASP.NET Core endpoint mappingFull relay handlerRack middleware + Rails routeN/A, direct mobile clientN/A, direct mobile clientN/A, direct mobile client
Remote config and capture policyYesYesYesYesYes, backend SDK pathYesYesYesYesYesYesYes, through native foundations
Local capture-rule enforcementDrop + sampled-out sampleDemote, sample, dropServer backstopServer backstopBrowser SDK path + server backstopServer backstopCapture policy locally, ingestion backstopServer backstopServer backstopServer backstopServer backstopNative SDK enforcement plus ingestion backstop
ProbesYesYesYesYesYes, through bundled SDKsYesYesYesYesYesYesYes
Redaction defaultsYesYesYesYesYesYesYesYesYes, with Rails filtersYesYesYes
Framework integrationsExpress, Fastify, Next.jsBrowser-native; works with React, Next.js client-side, Vue, Angular, Svelte, and vanilla appsDjango, Flask, FastAPILaravel, SymfonyWordPress plugin wrapperSpring Boot, servlet, JAX-RS/RESTEasy, WildFly/JBossASP.NET Core, gRPC, Worker Service, Hangfire, Azure Functions isolated worker, Microsoft.Extensions.Logging, Serilog, NLog, log4netnet/http, Gin, EchoRails, Rack, SidekiqAndroid runtime, OkHttp, Ktor, Navigation, Compose, TimberiOS runtime, URLSession, Alamofire, UIKit, SwiftUI, SwiftLogReact error boundary, React Navigation, Expo development builds
Local file transportYesNoYesYesRelay spool for browser eventsYesYesYesYesOffline queueOffline queueOffline queue

Across all shipped SDKs, request failures with 5xx responses remain incident signals. On the Browser SDK, first-party 5xx fetch and XMLHttpRequest responses also stay in the breadcrumb trail while emitting standalone request_event signals for incident creation.

Transport Modes

SDKs automatically select the right transport based on your configuration:

ModeDestinationWhen
File.debugbundle/local/events/Server-side local-only mode, or development/local environment in connected mode
Offline queueApp-private mobile storageAndroid, iOS, and React Native offline, background, local, and deferred-flush paths
HTTPPOST /v1/eventsConnected mode in staging/production
RelaySame-origin POST /debugbundle/browserBrowser SDK (always relays through your backend)

File transport uses atomic temp-file + rename to prevent partial writes. Android, iOS, and React Native use bounded app-private queues instead of writing directly to .debugbundle/local/events/.

Volume Control

All SDKs enforce automatic storm suppression to prevent runaway capture:

ControlBehavior
Duplicate windowWithin 30 seconds, only 3 identical events pass; the rest are suppressed
Loop detectionMore than 10 events in 2 seconds triggers suppression mode
Suppression checkpointsDuring suppression, one aggregate checkpoint event every 30 seconds
Auto-recovery60 seconds of silence resets suppression

Combined with server-side capture policy (configurable presets: minimal, balanced, investigative) and project capture rules (demote, sample, drop), you can control what gets captured, what remains context-only, and what is discarded after known noisy patterns are identified.

Next Steps

  • Node.js SDK — Full setup guide with Express, Fastify, Next.js, and logger integrations
  • Browser SDK — Breadcrumbs, network capture, session controls, relay setup
  • Python SDK — Django, Flask, FastAPI, and browser relay helpers
  • PHP SDK — Laravel, Symfony, Monolog, and browser relay setup
  • Java SDK — Spring Boot, servlet/JAX-RS, WildFly/JBoss, Javaagent, logging, and browser relay setup
  • .NET SDK — ASP.NET Core, Microsoft.Extensions.Logging, gRPC, Worker Service, Hangfire, Azure Functions, logging adapters, and browser relay setup
  • Go SDK — net/http, Gin, Echo, slog, zap, zerolog, and browser relay setup
  • Ruby SDK — Rails, Rack, Sidekiq, Logger, Semantic Logger, and browser relay setup
  • Android SDK — Crash replay, ANR/process-exit capture, offline queueing, OkHttp, Ktor, Navigation, Compose, Timber, and probes
  • iOS SDK — SwiftUI, UIKit, URLSession, Alamofire, SwiftLog, crash replay, offline queueing, and probes
  • React Native SDK — TypeScript API, React helpers, React Navigation, fetch/XHR trace propagation, Expo development builds, and native queues
  • WordPress Plugin — Installable plugin with backend capture, frontend capture, and a built-in browser relay
  • Universal Interface — Complete interface contract across all languages
  • Browser Relay Setup — How browser events reach DebugBundle through your backend

On this page