Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.bricks.tools/llms.txt

Use this file to discover all available pages before exploring further.

Activity log monitoring captures application events and screenshots from BRICKS Foundation devices and stores them in a cloud time-series database. Use it to analyze device behavior, track user interactions, monitor application health, and visually review what your devices were displaying at any point in time.
Activity log monitoring is available on Business plan workspaces.

Enable logging

Enable activity log on a device from BRICKS Controller:
  1. Open the device detail page
  2. Go to Settings > Activity Log
  3. Toggle Enabled on
You can also enable logging for all devices in a group by deploying activity log settings from the Device Group tab.

Event ID filter

Use the Event ID Filter field to set a regex pattern that controls which events are logged. Only events with IDs matching the pattern are captured. Leave empty to log all events.

What is logged

Events

Each log entry contains:
FieldDescription
Event nameIdentifier for the event type
TimestampWhen the event occurred
PayloadCustom event-specific content
Device IDWhich device produced the event
Subspace IDCanvas subspace context (if applicable)
SenderComponent or module that emitted the event
Events are grouped into three categories:
CategoryEvent namesDescription
GeneralBRICK_*, GENERATOR_*, CANVAS_*, SUBSPACE_*, and othersUI interactions, lifecycle events, and custom application events
DataPROPERTY_BANK_*Property bank state updates
Local SyncLOCAL_SYNC_INFODevice discovery and sync activity on the local network

Screenshots

When screenshot capture is enabled, screenshots can be triggered from BRICKS Controller and are uploaded as JPEG images to the activity log server. Screenshots are timestamped and stored per device, letting you visually review what was displayed on screen at any given moment. Screenshots are useful for:
  • Visual auditing — Confirm the correct content was shown during a campaign or time window
  • Incident investigation — See exactly what the device was displaying when an anomaly occurred
  • Remote monitoring — Get a visual check on deployed devices without physical access

How events are uploaded

Events are captured on-device, cached locally, and uploaded in batches to the activity log server at regular intervals (default: every 2 minutes). On browsers, a final upload is triggered automatically when the page unloads to minimize data loss.

Screenshots

How screenshot capture works

When enabled, screenshots can be triggered from BRICKS Controller and are uploaded as JPEG images to the activity log server, tagged with the capture timestamp. The server stores one image per device per timestamp — re-uploading at the same timestamp replaces the previous image. Each image must be under 5 MB.

Viewing screenshots

Screenshots can be retrieved by timestamp via BRICKS Controller or the GraphQL API. The screenshots query returns a list of available timestamps; fetch the image for any timestamp using the download API or the BRICKS CLI.
# List available screenshots for a device
bricks activity-log screenshots --device <device-id> --start-time 2024-01-01T00:00:00Z

# Download a specific screenshot
bricks activity-log screenshot --device <device-id> --ts 2024-01-15T10:30:00Z -o screenshot.jpg --open

Query with GraphQL

The activity log server exposes a GraphQL API for querying events and screenshots. Use it to build custom dashboards, integrate with external analytics tools, or automate log analysis.

Authentication

All GraphQL queries require a workspace token with the query_activity_log permission. Create one in BRICKS ControllerWorkspace SettingsTokens.

Endpoint

https://activity-log.bricks.tools/api/graphql
Include your token as a Bearer token:
Authorization: Bearer <token>

Queries

Query events

The API provides category-specific queries (general_events, data_events, local_sync_stats) and a unified events query for cross-category retrieval. Use the GraphQL explorer at the endpoint URL to browse the full schema.
query {
  general_events(filter: {
    device_id: "your-device-id"
    start_time: "2024-01-15T00:00:00Z"
    end_time:   "2024-01-15T23:59:59Z"
  }) @stream {
    timestamp
    event_name
    payload
  }
}

Available filter fields

FieldApplies toDescription
device_idAllFilter by device
event_typeevents onlygeneral, data, or local_sync
event_nameAllFilter by specific event name
subspace_idAllFilter by canvas subspace
senderAllFilter by emitting component
start_timeAllRange start (ISO 8601)
end_timeAllRange end (ISO 8601)
Time range queries are limited to 30 days per request.

Query screenshots

query {
  screenshots(filter: {
    device_id: "your-device-id"
    start_time: "2024-01-15T00:00:00Z"
    end_time:   "2024-01-15T23:59:59Z"
  }) @stream {
    timestamp
  }
}

Using the BRICKS CLI

The BRICKS CLI wraps the GraphQL API for common query patterns:
# Query events with filters
bricks activity-log events \
  --start-time 2024-01-15T00:00:00Z \
  --device your-device-id \
  --type general \
  --event-name BRICK_CLICK \
  --limit 100

# Output as JSON
bricks activity-log events --start-time 2024-01-15T00:00:00Z --device your-device-id -f json

Prometheus-compatible API

For metrics dashboards (Grafana, etc.), activity logs are also queryable via a Prometheus-compatible API. See the Query Activity Log guide in Workspace Settings for the endpoint URL and usage examples.

Data retention

Screenshots

Screenshot retention is determined by the workspace plan at the time of upload:
PlanScreenshot retention
Free7 days
Basic90 days
Pro90 days
Business90 days
Screenshots older than the retention period are automatically deleted. Upgrading your plan does not extend retention on screenshots already uploaded under a lower tier.

Events

Events do not have a fixed retention limit.

Use cases

  • User behavior analysis — Track how users interact with bricks and navigate canvases
  • Troubleshooting — Investigate what happened before an error or unexpected behavior
  • Fleet monitoring — Monitor event patterns across multiple deployed devices
  • Visual auditing — Review screenshots to confirm correct content was displayed
  • Performance tracking — Analyze generator response times and event frequency

Next steps

Debug panel

Inspect runtime state in real time on the device.

Automations

Run end-to-end automation tests on devices.