The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
docs - data apps (#85536)
Jeff Bruemmerf92484aea0da
diff --git a/docs/README.md b/docs/README.mdindex c6fe78c4a76..ee6225a805b 100644--- a/docs/README.md+++ b/docs/README.md@@ -124,6 +124,12 @@ Metabase's reference documentation.- [Dashboard subscriptions](./dashboards/subscriptions.md)- [Actions on dashboards](./dashboards/actions.md)+### Data apps++- [Data apps overview](./data-apps/start.md)+- [Build a data app](./data-apps/build.md)+- [Manage data apps](./data-apps/manage.md)+### Documents- [Introduction to documents](./documents/introduction.md)@@ -259,6 +265,7 @@ Metabase's reference documentation.- [Application logs](./monitor/application-logs.md)- [Model persistence log](./monitor/model-persistence-log.md)- [CLI analytics](./monitor/cli-analytics.md)+- [Data app analytics](./monitor/data-app-analytics.md)### Toolsdiff --git a/docs/data-apps/build.md b/docs/data-apps/build.mdnew file mode 100644index 00000000000..ad3f7b19ede--- /dev/null+++ b/docs/data-apps/build.md@@ -0,0 +1,160 @@+---+title: Data apps (beta)+summary: Data apps are custom apps that an AI coding agent builds on your semantic layer. They show your data in any layout you want, and can let people add, edit, and delete rows.+---++# Data apps (beta)++++> **Beta:** Data apps are in beta.++{% include plans-blockquote.html feature="Data apps" is_plural=true %}++Data apps are custom apps that you build on your Metabase data. Like a dashboard, a data app shows charts and tables from your [semantic layer](../data-modeling/semantic-layer/library.md). But an app isn't limited to cards and filters on a grid: an app can have its own layout, its own pages, and forms that add, edit, or delete rows in your database. An app doesn't have to write data: an app can just show data, from any database. You can build apps like portals, review queues, and forms, without having to stand up a separate app and backend.++A data app runs with the permissions of the person who opens it, so people see only the data that they're allowed to see. And an app can read only from your semantic layer and its own collection, and it can write data only through the actions in its own collection. See [what a data app can read and write](#what-a-data-app-can-read-and-write).++## How data apps work++You build and change data apps on your computer, with an AI coding agent and a development Metabase. Then you commit the app to your Remote Sync repository, pull the app into your production Metabase, and choose who can open the app.++Your agent does most of the work, but here's an overview of the end-to-end process:++1. On your development Metabase, create a [Remote Sync](../installation-and-operation/remote-sync.md) branch for the app, and clone your Remote Sync repository to your computer.+2. Describe the app to an AI coding agent, like Claude Code or Codex, on your computer. For example: "Create a Metabase data app to add, update, and delete products from the products table."+3. The agent uses the [Metabase CLI](../installation-and-operation/metabase-cli.md) to create the app on your development Metabase. The agent saves the questions and actions that the app runs to the [app's collection](#what-a-data-app-can-read-and-write).+4. The agent writes the app's code in your local clone of your Remote Sync repository. While the agent works, you [preview the app](#preview-the-app-on-your-computer) in your browser.+5. The agent builds the app and uploads it to your development Metabase. Admins can open the app there at `/apps/<slug>`.+6. Push the app from your development Metabase to your branch, and commit the app's source code to the same branch.+7. Merge the branch, and pull the changes into your production Metabase.+8. On your production Metabase, [choose which groups can open the app](./manage.md#choose-who-can-open-an-app).++## Requirements for data apps++- A Pro or Enterprise plan.+- An admin account. Only admins can create and manage apps.+- An AI coding agent, like Claude Code or Codex.+- The [Metabase CLI](../installation-and-operation/metabase-cli.md) (`mb`).+- Node.js 22.12 or later on your computer.+- A development Metabase, connected to your data warehouse, where you build and change your apps.+- [Remote Sync](../installation-and-operation/remote-sync.md), to ship your apps from your development Metabase to production. Your Remote Sync repository also keeps each app's source code.+- A [semantic layer](../data-modeling/semantic-layer/library.md) with the [published tables](../data-modeling/semantic-layer/published-tables.md) and metrics that your apps read. Your agent can publish tables and create metrics while it builds an app. But for apps that people rely on, use tables and metrics that you trust.+- If your apps write data, [actions enabled](../data-modeling/models/actions/introduction.md#enabling-actions-for-a-database) on the databases that your apps write to. An app that only shows data doesn't need actions, so the app can read from any database that Metabase connects to, even a database that doesn't support actions.++## What a data app can read and write++A data app runs with the permissions of the person who opens it. Their [data permissions](../permissions/data.md), including [row and column security](../permissions/row-and-column-security.md), apply to everything the app reads. If row and column security applies to a person on any table in a database, that person can't run the app's actions on that database.++An app can read only:++- [Published tables](../data-modeling/semantic-layer/published-tables.md), with their [segments](../data-modeling/semantic-layer/segments.md) and [measures](../data-modeling/semantic-layer/measures.md). The app can query these tables directly, without a saved question, but not with SQL.+- The metrics and dashboards in your [Library](../data-modeling/semantic-layer/library.md).+- The questions and metrics in its own collection.++An app can write data only through the actions in its own collection.++Your agent saves the questions, metrics, and actions that the app needs to the app's collection, and the collection can hold only questions, metrics, and actions. When your agent saves an item to the collection, Metabase refuses the item if it breaks a rule. The main rules are:++- Questions must be built with the query builder, not SQL. Questions can read only [published tables](../data-modeling/semantic-layer/published-tables.md) and metrics from your semantic layer, and the [segments](../data-modeling/semantic-layer/segments.md) and [measures](../data-modeling/semantic-layer/measures.md) of published tables. So questions can't start from or join another saved question or model.+- Actions can be table actions, which insert, update, or delete one row of a published table, or SQL actions.+- Items in the collection can't be archived or made public. Questions and metrics in the collection can't be embedded.++Only admins can edit an app's collection. You can't move the app's collection, move it to the trash, or make it official.++## Build the app with your agent++1. [Install the Metabase CLI](../installation-and-operation/metabase-cli.md#install-the-cli), and [log the CLI in](../installation-and-operation/metabase-cli.md#authenticate-the-cli) as an admin to your development Metabase.+2. Install the [metabase-cli skill](../installation-and-operation/metabase-cli.md#the-metabase-cli-skill) for your agent. The CLI comes with its own skills for building data apps, and the metabase-cli skill tells your agent to load them.+3. On your development Metabase, [create a Remote Sync branch](../installation-and-operation/remote-sync.md#creating-a-branch) for the app.+4. Start your agent in a local clone of your Remote Sync repository, so that the app's source code goes in the repository with the app. See [what syncs with a data app](#what-syncs-with-a-data-app).+5. Ask your agent to create a Metabase data app, and follow its instructions. For example:++ ```text+ Create a Metabase data app that lets people look up product info, and add, edit, or remove products. Make it look cool.+ ```++The agent creates the app on your development Metabase, adds the questions and actions that the app needs to the app's collection, and writes the app's code in `data_apps/<slug>/`. Then the agent builds the app, and uploads the app's bundle (the built app, up to 10 MiB) to your development Metabase. The agent gives you the app's address, `/apps/<slug>`.++To build and preview the app, the agent runs commands on your computer, like `mb` (the Metabase CLI), `npm run build`, and `npm run dev`. Your agent might ask for your permission before it runs these commands.++A new app starts live: it opens at its address. Admins can open the app right away. To let other people open it, [add their groups](./manage.md#choose-who-can-open-an-app) to the app. To take an app offline, [make it a draft](./manage.md#make-an-app-live-or-a-draft).++## Preview the app on your computer++> **The preview changes real data:** The preview runs the app's actions against the database that your development Metabase connects to. If that's your production data warehouse, the adds, edits, and deletes that you try out in the preview change your production data. Try out actions on rows that you add for testing.++The agent starts a preview of the app at a `localhost` address on your computer. The preview runs on your computer, but it gets its data from your development Metabase. Open the preview in your browser, and keep the tab open while the agent works: the agent reads the app's errors from the open preview. To start the preview again later, ask your agent.++The preview needs an admin [API key](../people-and-groups/api-keys.md). The agent creates the key on your development Metabase, writes it into a `.env.local` file that Git ignores, and deletes the key when it's done. Since the preview uses an admin key, it shows what an admin can see, not what the app's viewers can see.++If your agent can't create the key, for example because its permission settings block it, [create an API key](../people-and-groups/api-keys.md#create-an-api-key) in the **Administrators** group yourself. Then put it in a `.env.local` file in the app's directory, next to `package.json`:++```text+DATA_APP_MB_URL=<your development Metabase URL>+DATA_APP_MB_API_KEY=<your API key>+```++Delete the key when you no longer need the preview.++## Ship the app to production with Remote Sync++When [Remote Sync](../installation-and-operation/remote-sync.md) is on, it always syncs your data apps, so an app ships to production like the rest of your synced content. Use the same steps for a new app and for each change to an app:++1. On your development Metabase (in Read-write mode), [push your changes](../installation-and-operation/remote-sync.md#pushing-changes-to-git) to your branch. The push adds the app's manifest, bundle, and collection to the branch.+2. In your local clone, switch to the branch, and pull it.+3. Commit the app's directory, `data_apps/<slug>/`, and push the commit. The commit adds the app's source code to the branch.+4. On your development Metabase, [pull the changes](../installation-and-operation/remote-sync.md#pulling-changes-from-git). If you skip this step, the next push from Metabase has a conflict.+5. Merge your branch into the branch that your production Metabase pulls from, for example with a [pull request](../installation-and-operation/remote-sync.md#step-4-create-a-pull-request).+6. On your production Metabase (in Read-only mode), [pull the changes](../installation-and-operation/remote-sync.md#pulling-changes-from-git). If your production Metabase uses [auto-sync](../installation-and-operation/remote-sync.md#pulling-changes-automatically), it pulls the changes on its own within five minutes.+7. The first time that you ship an app, [add the groups](./manage.md#choose-who-can-open-an-app) that can open the app on your production Metabase.++If you let your agent use Git, the agent can do these steps for you.++Remote Sync doesn't sync an app's group access or its [status](./manage.md#make-an-app-live-or-a-draft) (live or draft), so each Metabase keeps its own. The first pull creates the app on your production Metabase as live, and only admins can open it until you add groups there. Later pulls keep the app's status on production, so you can make the app a draft on production without changing it on development.++Your production Metabase also needs the published tables and metrics that the app reads. A pull doesn't check that the tables are published, but the pull fails if the app's questions use metrics that aren't in your production Library. So add your [Library](../installation-and-operation/remote-sync.md#you-choose-what-to-sync), which holds your semantic layer, to Remote Sync too. If your app uses actions, [enable actions](../data-modeling/models/actions/introduction.md#enabling-actions-for-a-database) on the production databases that the app writes to.++### What syncs with a data app++Remote Sync syncs the app's manifest, its bundle, and its collection with its questions and actions. Remote Sync doesn't sync the app's source code: pushes from Metabase don't change the source code, and pulls ignore it. You commit the source code yourself. In your repository:++- `data_apps/<slug>/data_app.yaml` is the app's manifest.+- `data_apps/<slug>/dist/index.js` is the app's bundle.+- The rest of `data_apps/<slug>/` is the app's source code.+- `collections/data_apps/` holds the app's collection.++When your agent builds the app, it writes the bundle to `build/index.js` and uploads it to your development Metabase. When Metabase pushes the app, it writes the uploaded bundle to `dist/index.js`. So the template's `.gitignore` keeps `build/` out of your repository, together with `node_modules/` and `.env.local`. Don't edit the manifest or the bundle by hand.++## Change a data app++1. On your development Metabase, [create a Remote Sync branch](../installation-and-operation/remote-sync.md#creating-a-branch) for the change.+2. In your local clone of your Remote Sync repository, pull the latest source code, so that you start from the latest version of the app.+3. Start your agent in the clone, and ask for the change. The agent updates the code, builds the app again, and uploads the new version to your development Metabase.+4. [Ship the change to production](#ship-the-app-to-production-with-remote-sync).++Each app has only one bundle, and each upload replaces it, so Metabase has no version history for an app. If two people change the same app at the same time, the last upload wins: an upload from an older copy of the source code removes the changes in the newer bundle. To go back to an earlier version, ask your agent to build the app from an earlier commit of the source code, and upload it again.++Any admin can change an app from their own computer. Clone your Remote Sync repository, do steps 1 and 2 of [Build the app with your agent](#build-the-app-with-your-agent), and start your agent in the clone. Git doesn't keep the app's packages (`node_modules/`) or the preview's API key (`.env.local`), so the agent installs the packages and creates a new API key on each computer.++## Let an app fetch data from other sites++A data app runs in a sandbox, so by default the app can't make network requests to other sites. To let an app get data from a site, add the site's origin to the app's allowed hosts:++```sh+mb data-app update <slug> --body '{"allowed_hosts":["https://api.example.com"]}'+```++The list replaces the app's allowed hosts, so include every origin that the app needs. Your agent can also change the list for you.++The app can then get data from the site with `fetch`. The app can also show the site's images, embed the site's pages, and submit forms to the site. An origin that starts with `*.`, like `https://*.example.com`, matches subdomains, but not the domain itself.++## Have fun++Ask your agent for any style you like.++++## Let us know what you think++Data apps are in active development. If you run into a bug or have an idea for how data apps should work, [file an issue](https://github.com/metabase/metabase/issues/new/choose).diff --git a/docs/data-apps/images/data-app-retro.png b/docs/data-apps/images/data-app-retro.pngnew file mode 100644index 00000000000..12e9ae2a756Binary files /dev/null and b/docs/data-apps/images/data-app-retro.png differdiff --git a/docs/data-apps/images/data-apps-list.png b/docs/data-apps/images/data-apps-list.pngnew file mode 100644index 00000000000..aa2606b2f88Binary files /dev/null and b/docs/data-apps/images/data-apps-list.png differdiff --git a/docs/data-apps/images/data-apps-overview-tab.png b/docs/data-apps/images/data-apps-overview-tab.pngnew file mode 100644index 00000000000..a7dbca1484fBinary files /dev/null and b/docs/data-apps/images/data-apps-overview-tab.png differdiff --git a/docs/data-apps/images/data-apps-permissions-tab.png b/docs/data-apps/images/data-apps-permissions-tab.pngnew file mode 100644index 00000000000..12a40d854a0Binary files /dev/null and b/docs/data-apps/images/data-apps-permissions-tab.png differdiff --git a/docs/data-apps/images/example-data-app.webp b/docs/data-apps/images/example-data-app.webpnew file mode 100644index 00000000000..6f1956381a0Binary files /dev/null and b/docs/data-apps/images/example-data-app.webp differdiff --git a/docs/data-apps/manage.md b/docs/data-apps/manage.mdnew file mode 100644index 00000000000..ca38e45423e--- /dev/null+++ b/docs/data-apps/manage.md@@ -0,0 +1,80 @@+---+title: Manage data apps+summary: In Data Studio, admins see what each data app reads and writes, make apps live or drafts, and choose which groups can open them.+---++# Manage data apps++_Data Studio > Data apps_++{% include plans-blockquote.html feature="Data apps" is_plural=true %}++Only admins can manage data apps.++1. Click the **grid** icon in the upper right and select **Data studio**.+2. In the left sidebar, under **Library**, click **Data apps**.++The list shows each app's **Name**, **Address**, **Status**, and **Last synced** time. The address is where people open the app, `/apps/<slug>`. **Last synced** is the last time the app itself changed, like a new bundle or a status change. Edits to the app's questions and actions don't update it.++++To open a live app, click the **three dots** on the app's row and select **Open app**.++## See what an app reads and writes++Before you let more people open an app, check which data the app reads and writes. In the list of data apps, click the app. The app's **Questions** and **Actions** tabs list the questions and actions in the app's collection, and the **Permissions** tab lists the groups that can open the app. The list of questions doesn't include the app's metrics. The app's **Overview** tab has a preview of the app.++These tabs don't show everything that the app can read. The app can also read your published tables, and the metrics and dashboards in your Library. See [what a data app can read and write](./build.md#what-a-data-app-can-read-and-write).++++To see what a question or action depends on, open the question or action, and go to its **Dependencies** tab. To see the whole app, look up the app in the [dependency graph](../data-modeling/tools/graph.md).++To see the questions and actions that your apps run, who runs them, and what fails, check out [Data app analytics](../monitor/data-app-analytics.md) in Monitor.++## Make an app live or a draft++An app's status controls whether the app opens at its address:++- **Live**: Admins, and people in the app's groups, can open the app at its address.+- **Draft**: Nobody can open the app at its address, not even admins. Admins can only preview the app on its **Overview** tab in Data Studio.++New apps start live. Make an app a draft to take it offline, for example while you fix a problem. To change an app's status:++1. In the list of data apps, click the **three dots** on the app's row.+2. Select **Make draft** (or **Make live**), and confirm.++## Choose who can open an app++On the app's **Permissions** tab:++1. Click **Add groups**.+2. Search for one or more groups, and select them.+3. Click **Add**.++Admins can always open live apps, so you can't add the **Administrators** group. If an app has no groups, only admins can open it.++[Tenant users](../embedding/tenants.md#user-types) can't open data apps. You can't add [tenant groups](../embedding/tenants.md#create-tenant-groups) or the **All tenant users** group to an app, and tenant users can't be in the other groups.++### Check that groups can see the app's data++Adding a group to an app lets people in that group open the app, and gives the group read access to the app's collection. Adding a group doesn't change their [data permissions](../permissions/data.md). If the **Data access** column says **Missing N tables**, people in that group don't have [Can view](../permissions/data.md#can-view-data-permission) access to some of the tables that the app's questions and actions read. The check counts the group's own access, and All Users access, but not access that people get from their other groups. The check also doesn't look at [row and column security](../permissions/row-and-column-security.md): a group with row and column security can show **All tables**, but people in that group can't run the app's actions on that database.++++The check uses the [dependency graph](../data-modeling/tools/graph.md). Since the graph updates in the background, a warning can also lag behind your latest edits.++To fix the group's access:++1. Click the group's row. A sidebar opens with the group's **Missing tables**.+2. Click a table, and select **Change permissions** to open that table's data permissions.++## Delete a data app++Data Studio doesn't have an option to delete apps. To delete an app, ask your agent, or run:++```sh+mb data-app delete <slug>+```++Deleting an app also deletes its collection (with its questions and actions), its bundle, and its group access.diff --git a/docs/data-apps/start.md b/docs/data-apps/start.mdnew file mode 100644index 00000000000..d80a92be3ad--- /dev/null+++ b/docs/data-apps/start.md@@ -0,0 +1,19 @@+---+title: Data apps overview+---++# Data apps overview++Data apps are custom apps that you build on your Metabase data with an AI coding agent. Like dashboards, data apps show your data from your semantic layer. But an app can have any layout and its own pages, and people can add, edit, and delete data from the app. A data app runs with the permissions of the person who opens it, so people see only the data that they're allowed to see.++## [Build a data app](./build.md)++What you need to build an app, how an AI coding agent builds and changes it with the Metabase CLI, where to keep the app's source code, and how to ship the app to production with Remote Sync.++## [Manage data apps](./manage.md)++See what each app reads and writes, make apps live or drafts, choose which groups can open them, and see how people open them.++## [Data app analytics](../monitor/data-app-analytics.md)++See the questions and actions that your apps run, who runs them, and what fails.diff --git a/docs/data-modeling/data-studio.md b/docs/data-modeling/data-studio.mdindex 9deb6a5b14d..4a4ddf18d65 100644--- a/docs/data-modeling/data-studio.md+++ b/docs/data-modeling/data-studio.md@@ -31,6 +31,7 @@ The first time you open Data Studio, you'll land on the **Guide**: a quick tour### Library- **[Semantic layer](semantic-layer/library.md)**\*: A curated space for your organization's most trusted analytics content—tables, metrics, dashboards, and SQL snippets that your data team recommends.+- **[Data apps](../data-apps/manage.md)**\*: Manage your [data apps](../data-apps/start.md), the custom apps that an AI coding agent builds on your semantic layer. Admins see what each app reads and writes, take apps offline, and choose which groups can open each app. Only admins see Data apps.- **[Glossary](./semantic-layer/glossary.md)**: Define terms relevant to your business, both for people and agents trying to understand your data.### Toolsdiff --git a/docs/data-modeling/images/data-studio.png b/docs/data-modeling/images/data-studio.pngindex 400530b5520..85bc1b17c79 100644Binary files a/docs/data-modeling/images/data-studio.png and b/docs/data-modeling/images/data-studio.png differdiff --git a/docs/data-modeling/tools/graph.md b/docs/data-modeling/tools/graph.mdindex 8f46668c191..f9f92960111 100644--- a/docs/data-modeling/tools/graph.md+++ b/docs/data-modeling/tools/graph.md@@ -29,6 +29,7 @@ The dependency graph tracks the relationships between Metabase entities:- [Metrics](../../data-modeling/semantic-layer/metrics.md)- [Dashboards](../../dashboards/introduction.md)- [Documents](../../documents/introduction.md)+- [Data apps](../../data-apps/start.md)Dependency graph will also show the dependencies of Metabase entities on the tables that serve as data sources for those entities.diff --git a/docs/installation-and-operation/remote-sync.md b/docs/installation-and-operation/remote-sync.mdindex 2ad3a270b5a..7107c17aa58 100644--- a/docs/installation-and-operation/remote-sync.md+++ b/docs/installation-and-operation/remote-sync.md@@ -12,6 +12,7 @@ Remote Sync lets you develop analytics content in your Metabase and automaticall- Top-level collections (dashboards, questions, models, metrics)- Library content (published tables with their segments and measures, plus metrics, dashboards, snippets, and the glossary)- Transforms+- [Data apps](../data-apps/build.md#what-syncs-with-a-data-app), with their bundles and collectionsMetabase doesn't sync any of your data. All Metabase stores in Git are [YAML files](./serialization.md#example-of-a-serialized-question) that describe your analytics content. Your actual data stays in your databases and never leaves your Metabase.@@ -38,7 +39,11 @@ Your repository can't change users, groups, or permissions, because those [don't### Remote Sync has two modes for different roles- **Read-write mode**: Create and edit content. You can [push](#pushing-changes-to-git) and [pull](#pulling-changes-from-git) changes to and from your repository. Multiple Metabase instances can connect in Read-write mode, each working on [different branches](#branch-management).-- **Read-only mode**: Read-only instances only [pull](#pulling-changes-from-git) changes (typically from your main branch) and don't allow direct editing of synced content. In Read-only mode, you also can't edit transforms (transforms are always read-only in this mode—see [Configure transforms syncing](#8-configure-transforms-syncing-optional)), can't edit Library content, and can't create segments or measures on published tables. You can set up [auto-sync](#pulling-changes-automatically) to automatically pull approved changes every five minutes.+- **Read-only mode**: Read-only instances only [pull](#pulling-changes-from-git) changes (typically from your main branch) and don't allow direct editing of synced content. You can set up [auto-sync](#pulling-changes-automatically) to automatically pull approved changes every five minutes. In Read-only mode, you also can't:+ - Edit transforms. Transforms are always read-only in this mode. See [Configure transforms syncing](#8-configure-transforms-syncing-optional).+ - Edit Library content.+ - Create segments or measures on published tables.+ - Create, edit, or delete [data apps](../data-apps/build.md#ship-the-app-to-production-with-remote-sync).### You choose what to sync@@ -369,6 +374,7 @@ Remote Sync uses the same serialization format as the [Metabase CLI serializatio- Collection structure and metadata- Library content (published tables, metrics, dashboards, snippets, segments, measures, glossary)- Transforms (including tags, tests, and folders)+- [Data apps](../data-apps/build.md#what-syncs-with-a-data-app), with their bundles and collections**What doesn't sync:**@@ -378,6 +384,7 @@ Remote Sync uses the same serialization format as the [Metabase CLI serializatio- Transform jobs- Personal collections- Table metadata (table names, column types, descriptions, visibility settings, etc.)+- A data app's live or draft status, and its group access### Synced content that uses a database your Metabase doesn't havediff --git a/docs/monitor/cli-analytics.md b/docs/monitor/cli-analytics.mdindex 4d880bbcc6a..301fb686f82 100644--- a/docs/monitor/cli-analytics.md+++ b/docs/monitor/cli-analytics.md@@ -11,7 +11,7 @@ _Monitor > CLI analytics_The CLI analytics page shows how people use the [Metabase CLI](../installation-and-operation/metabase-cli.md) with your instance. Metabase records one row for every API call the CLI makes, so you can see whether anyone is using it, which operations they run, how often they run them, and when each person last used it.-Admins and people in groups with [Monitoring access](../permissions/application.md#monitoring-access) can view CLI analytics. See [Permissions for Monitor](./start.md#permissions-for-monitor).+Only admins can view CLI analytics. See [Permissions for Monitor](./start.md#permissions-for-monitor).The page has two tabs:diff --git a/docs/monitor/data-app-analytics.md b/docs/monitor/data-app-analytics.mdnew file mode 100644index 00000000000..17b251cd7f6--- /dev/null+++ b/docs/monitor/data-app-analytics.md@@ -0,0 +1,35 @@+---+title: Data app analytics+summary: See the questions and actions that your data apps run, who runs them, and what fails.+---++# Data app analytics++{% include plans-blockquote.html feature="Data app analytics" %}++_Monitor > Data app analytics_++Data app analytics logs each question and action that your [data apps](../data-apps/start.md) run: which app ran it, who ran it, when it ran, how long it took, and whether it failed. Use data app analytics to see which apps people use, and which questions and actions fail.++To view the analytics:++1. Click the **grid** icon in the upper right and select **Monitor**.+2. In the left sidebar, under **AI Auditing**, click **Data app analytics**.++Only admins can see data app analytics. Runs from an app's [preview on your computer](../data-apps/build.md#preview-the-app-on-your-computer) don't show on this page.++You can filter the log by app, by person, by time, and to only questions or only actions. By default, the log shows the last 30 days. Apps that you deleted stay in the log, listed by their slug.++## IP addresses and user agents are off by default++The log shows people's IP addresses and user agents only if you turn on [`MB_ANALYTICS_PII_RETENTION_ENABLED`](../configuring-metabase/environment-variables.md#mb_analytics_pii_retention_enabled).++## Build your own reports on data app activity++To build your own questions about data app activity, click **Query this data**. Metabase opens the query builder on the [query log](../usage-and-performance-tools/usage-analytics-reference.md#query-log), filtered to data app activity.++The questions that an app reads also count as views of those questions in [Usage analytics](../usage-and-performance-tools/usage-analytics.md).++## How long Metabase keeps data app activity++Metabase keeps query log rows for 720 days by default, then deletes them, so older activity drops off the page. To change the limit, set [`MB_AUDIT_MAX_RETENTION_DAYS`](../configuring-metabase/environment-variables.md#mb_audit_max_retention_days).diff --git a/docs/monitor/start.md b/docs/monitor/start.mdindex 74eef06aa3b..b6c52c463c2 100644--- a/docs/monitor/start.md+++ b/docs/monitor/start.md@@ -47,6 +47,7 @@ The AI auditing tabs are only available on [Pro and Enterprise plans](https://ww- **[Conversations](../ai/usage-auditing.md#conversations)**: Review people's conversations with Metabot.- **MCP analytics**: See usage of the [Metabase MCP server](../ai/mcp.md).- **[CLI analytics](./cli-analytics.md)**: See which operations the [Metabase CLI](../installation-and-operation/metabase-cli.md) runs against your Metabase.+- **[Data app analytics](./data-app-analytics.md)**: See the questions and actions that your [data apps](../data-apps/start.md) run.## Permissions for Monitor@@ -54,6 +55,6 @@ Who can see each Monitor page depends on their group:- **Admin group** can view every page.- **[Data Analysts](../people-and-groups/managing.md#data-analysts) group** can view Dependency diagnostics.\*-- **Groups with [Monitoring access](../permissions/application.md#monitoring-access)** can view every page except Dependency diagnostics, Alerts management, and API key usage.\*+- **Groups with [Monitoring access](../permissions/application.md#monitoring-access)** can view every page except Dependency diagnostics, Alerts management, Session management, API key usage, and the [AI auditing](#ai-auditing) pages.\*\* On OSS, only admins can view Monitor. The Data Analysts group and the Monitoring access permission are only available on [Pro and Enterprise plans](https://www.metabase.com/pricing).diff --git a/docs/permissions/application.md b/docs/permissions/application.mdindex 9fad92dada1..cb0661349dd 100644--- a/docs/permissions/application.md+++ b/docs/permissions/application.md@@ -46,7 +46,9 @@ The following Monitor pages aren't included in Monitoring access:- [Dependency diagnostics](../monitor/dependency-diagnostics.md): Available to admins and people in the [Data Analysts](../people-and-groups/managing.md#data-analysts) group- [Alerts management](../monitor/alerts-management.md): Available to admins only+- [Session management](../monitor/session-management.md): Available to admins only- [API key usage](../monitor/api-key-usage.md): Available to admins only+- [AI auditing](../monitor/start.md#ai-auditing) pages, like [CLI analytics](../monitor/cli-analytics.md) and [Data app analytics](../monitor/data-app-analytics.md): Available to admins only## Subscriptions and alertsdiff --git a/docs/util/data/nav.yml b/docs/util/data/nav.ymlindex e06be58e1ea..7577a43b3f7 100644--- a/docs/util/data/nav.yml+++ b/docs/util/data/nav.yml@@ -119,6 +119,14 @@ categories:- name: "Actions on dashboards"url: "dashboards/actions"+ - name: "Data apps"+ url: "data-apps/start"+ pages:+ - name: "Build a data app"+ url: "data-apps/build"+ - name: "Manage data apps"+ url: "data-apps/manage"+- name: "Documents"url: "documents/start"pages:@@ -490,6 +498,8 @@ categories:url: "usage-and-performance-tools/usage-analytics"- name: "API key usage"url: "monitor/api-key-usage"+ - name: "Data app analytics"+ url: "monitor/data-app-analytics"- name: "Admin tools"url: "monitor/erroring-questions"- name: "Panopticon"