Skip to content

Status block

The native_observability_status_block submodule provides a configurable block summarizing what Native Observability captures and stores. It is part of the DASHBOARD preset (drush no:preset:dashboard).

Routes

The submodule defines no routes. The block is placed and configured through Drupal core's block layout UI (/admin/structure/block), gated by core's administer blocks permission. There is no dedicated view permission for the block output itself; its cache varies by user.permissions because its content depends on the visitor's role-based visibility settings on the placed instance.

Placing the block

  1. Enable native_observability_status_block (included automatically by the DASHBOARD preset).
  2. Go to Administration > Structure > Block layout.
  3. Place the block listed under the Native Observability category as Native Observability: Status summary, plugin ID native_observability_status_block.
  4. Configure the block-specific settings described below and save.

Block settings

NativeObservabilityStatusBlock::blockForm exposes:

  • Variant. compact or detailed. Selects the Twig template suggestion: native-observability-status-block.html.twig for compact, native-observability-status-block--detailed.html.twig for detailed. The detailed variant additionally lists every raw key/value pair from the capture configuration.
  • Show capture settings summary. Toggles the human-readable capture summary lines (capture on/off, user ID, client IP mode, User-Agent mode, headers/query/body modes).
  • Show retention summary. Toggles the retention days and max rows lines.
  • Show warnings. Toggles warnings for riskier capture modes (full client IP, full User-Agent, full query string, full request body, and a combined warning when both full IP and full User-Agent are active).
  • Show meta info. Toggles an extra technical info block intended for administrators.

What it reads and renders

NativeObservabilityStatusBlock::build() reads the capture and retention keys from native_observability.settings and renders them through the native_observability_status_block theme hook. The render array caches on the config:native_observability.settings tag, so any change to the capture settings form invalidates the block automatically.

flowchart LR
    A[block.build] --> B[Read native_observability.settings]
    B --> C[Build capture summary lines]
    B --> D[Build risk warnings]
    C --> E{Block config toggles}
    D --> E
    E --> F[Render compact or detailed template]

For the meaning of the capture and retention keys themselves (client_ip_mode, user_agent_mode, headers_mode, query_mode, body_mode, store_uid, retention.days, retention.max_rows), see Configuration.