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.
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. Every page is a Views display you can change at /admin/structure/views.
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.
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.
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.
Modules that record or expose AI requests and token usage.
mysql database driver name and does not yet support Drupal 11.4's namespaced driver identifier.