DebugBundle

Capture Policy

Control what events your SDKs capture and send using presets and fine-grained controls.

The capture policy controls how your SDKs behave — what types of events they capture, at what verbosity level, and how breadcrumbs and probes are handled. Each project has one capture policy that applies to all SDKs connecting to it.

Presets

Presets provide sensible defaults for common scenarios. Choose a preset, then optionally override individual controls.

PresetLogsRequest EventsBreadcrumbsProbe EventsBest For
minimalerrorofflocal_onlybuffer_onlyFree tier, low-traffic apps
balancedwarningfailures_onlyexception_onlybuffer_onlyMost projects (default for Solo/Team)
investigativeinfoallstandalonestandalone_when_activatedActive debugging, full visibility

Default Preset by Tier

TierDefault Preset
Freeminimal
Solobalanced
Teambalanced

Controls

Capture Logs

Controls which log levels are captured and sent as events.

ValueBehavior
offNo log events captured.
errorOnly error and fatal log events.
warningwarning, error, and fatal log events.
infoAll log events including info, warning, error, fatal.

Capture Request Events

Controls which HTTP request/response pairs are captured.

ValueBehavior
offNo request events captured.
failures_onlyOnly requests with 4xx/5xx responses.
filteredRequests matching configured filters (routes, status codes).
allAll requests captured.

Capture Breadcrumbs

Controls how frontend breadcrumbs (clicks, route changes, console logs) are handled.

ValueBehavior
local_onlyBreadcrumbs buffered locally, attached only to exception events.
exception_onlyBreadcrumbs sent only when an exception is captured.
standaloneBreadcrumbs sent as independent events (highest volume).

Capture Probe Events

Controls how probe-collected data is handled.

ValueBehavior
buffer_onlyProbe data buffered locally, attached to the next exception event.
standalone_when_activatedProbe data sent as independent events when a probe is active.

Managing the Policy

API

# Get current policy
curl https://api.debugbundle.com/v1/projects/proj_01HXYZ.../capture-policy \
  -H "Authorization: Bearer dbundle_member_a1b2c3d4..."

# Update policy
curl -X PATCH https://api.debugbundle.com/v1/projects/proj_01HXYZ.../capture-policy \
  -H "Authorization: Bearer dbundle_member_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{ "preset": "investigative" }'

CLI

# View current policy
debugbundle capture-policy get --project-id proj_01HXYZ...

# Switch to investigative mode
debugbundle capture-policy set --project-id proj_01HXYZ... --preset investigative

# Override a specific control
debugbundle capture-policy set --project-id proj_01HXYZ... --capture-logs info

Override Behavior

When you set a preset, all controls reset to the preset defaults. You can then override individual controls:

# Start with balanced preset, but capture all request events
curl -X PATCH https://api.debugbundle.com/v1/projects/proj_01HXYZ.../capture-policy \
  -H "Authorization: Bearer dbundle_member_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "preset": "balanced",
    "capture_request_events": "all"
  }'

Result: all controls use balanced defaults except capture_request_events which is all.

To clear an override and revert to the preset default, set the field to null:

{ "capture_request_events": null }

SDK Behavior

SDKs fetch the capture policy from the server during initialization and periodically refresh it. When the policy changes, SDKs adjust their capture behavior without requiring a restart or redeploy.

In local-only mode, SDKs use built-in defaults (equivalent to the balanced preset).

Next Steps

On this page