Skip to main content
Pass options as keyword arguments to Brello(). Explicit arguments take precedence over environment variables. Debug output masks user and attribute values by default. If the environment and project key disagree, event delivery is disabled and provider calls continue.

Connect to self-hosted Brello

You can also pass api_base_url to Brello(). Use HTTPS outside loopback development.

Attribute usage to users and features

Context follows the current async task. Use a regular with block around awaited provider calls. Set defaults through wrap(client, ...) and pass end_user=False or attributes=False to omit those fields. Brello includes user and attribute fields when the project permits collection. With hashing enabled, it omits the user until SDK configuration supplies hashing settings. See privacy and collection.

Batch and flush events

The background worker starts a batch after 20 events or about two seconds. The buffer holds up to 500 events or 2 MiB of serialized events, including the batch in flight. Older pending events are evicted when the buffer fills. Events expire after 60 seconds. Retries reuse the same UUID and honor Retry-After. After three consecutive ingestion failures caused by a network error, timeout, or HTTP 5xx, delivery pauses for 30 seconds. The next batch checks recovery. Further failures extend the pause up to five minutes. Provider calls continue during delivery failures. Call brello.flush() or await brello.aflush() during shutdown or before a short-lived invocation ends. The default wait is five seconds. Both methods take a timeout in seconds and can return early when delivery is paused past the deadline.