AI observability with Views is a Drupal recipe that stores Drupal AI provider events in your SQL database and gives you a searchable event log and four usage charts, all built as editable Views under /admin/reports/ai-requests.

What you get after applying

A Reports menu entry named AI requests with a paginated event log, an event detail page showing the captured prompt and response, and bar charts for requests per day, requests per model, tokens per model and tokens per day, a guardrail results report and a conversation view that follows one request thread. Every page is a Views display you can change at /admin/structure/views.


Features

AI request events log with filters and a paginated table of request and response events AI event detail page showing request metadata, prompt, response and token usage AI request volume bar chart of requests started per UTC day with its data table AI requests by model bar chart per provider and model with its data table AI tokens by model bar chart of reported total tokens per provider and model AI token trend bar chart of reported total tokens per UTC day

How counting works

The log lists events, not requests. Request charts count only request-start events. Token charts sum the total token usage reported on completion and streaming completion events. Missing usage is left out rather than estimated as zero. Day buckets use UTC and days without events are omitted. Provider-disabled events never count as requests.

Coverage is limited to calls that go through the Drupal AI provider layer. Calls made directly through a vendor SDK are invisible. Failed or abandoned calls can leave a start event without a completion. The recipe does not report latency, error rates or monetary cost, because the AI Observability module does not record that data.


Installation

Download the recipe and its dependencies with Composer from your project root:

composer require drupal/ai_recipe_observability_views

Rebuild caches so Drupal discovers the new modules, then apply the recipe:

drush cache:rebuild

php vendor/bin/dr recipe:apply recipes/ai_recipe_observability_views

drush cache:rebuild

Back up the database before applying. A failed application can leave partial changes, and restoring the database does not undo Composer changes.

Recipe inputs

Prompt and response text capture are on by default. To keep request metadata but skip the text, pass the two inputs as 0:

php vendor/bin/dr recipe:apply recipes/ai_recipe_observability_views --input='ai_recipe_observability_views.log_input=0' --input='ai_recipe_observability_views.log_output=0'

You can change text capture later in the AI Observability settings.

The recipe sets Logger to write to the database only, down to the info level, and replaces any existing Logger targets and field selection. This affects every Drupal logging channel, not only AI. Re-add file or syslog targets afterwards if you need them. Logs can contain prompts, responses and provider configuration, so review Logger DB retention (93 days by default with cron cleanup) and who holds the Administer AI Observability permission. No role receives that permission automatically.


Configuration effects


Related Modules

Other ways to see AI activity

Modules that record or expose AI requests and token usage.



Requirements/Dependencies