Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

10.2 KB
Raw Blame
name: AI Usage Log
description: One row per LLM round-trip with per-call tokens, source, model, profile, and more.
entity_id: joMVMZY847nXW3WBi-zIn
created_at: '2026-04-24T20:05:45.950203Z'
creator_id: [email protected]
display: table
collection_id: vG58R8k-QddHWA7_47umn
collection_position: 23
query_type: query
database_id: Internal Metabase Database
table_id: [Internal Metabase Database, public, v_ai_usage_log]
parameters: []
parameter_mappings: []
dataset_query:
  database: Internal Metabase Database
  stages:
  - source-table: [Internal Metabase Database, public, v_ai_usage_log]
    lib/type: mbql.stage/mbql
  lib/type: mbql/query
result_metadata:
- base_type: type/BigInteger
  coercion_strategy: null
  description: Primary key from ai_usage_log.id.
  display_name: Usage Log ID
  effective_type: type/BigInteger
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, usage_log_id]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, usage_log_id]
  name: usage_log_id
  semantic_type: type/PK
  settings: null
  visibility_type: normal
- base_type: type/DateTimeWithLocalTZ
  coercion_strategy: null
  description: Timestamp of this LLM round-trip.
  display_name: Created At
  effective_type: type/DateTimeWithLocalTZ
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, created_at]
  - {temporal-unit: default}
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, created_at]
  name: created_at
  semantic_type: type/CreationTimestamp
  settings: null
  unit: default
  visibility_type: normal
- base_type: type/Text
  coercion_strategy: null
  description: Originating surface for the call (e.g. metabot_agent, slackbot, document_generate_content, oss-sql-gen).
  display_name: Source
  effective_type: type/Text
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, source]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, source]
  name: source
  semantic_type: type/Category
  settings: null
  visibility_type: normal
- base_type: type/Text
  coercion_strategy: null
  description: Display label for the originating surface (e.g. Metabot, Documents, Slackbot, SQL); humanized version of source.
  display_name: Source Name
  effective_type: type/Text
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, source_name]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, source_name]
  name: source_name
  semantic_type: type/Category
  settings: null
  visibility_type: normal
- base_type: type/Text
  coercion_strategy: null
  description: Provider/model identifier returned by the LLM (e.g. anthropic/claude-sonnet-4-20250514).
  display_name: Model
  effective_type: type/Text
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, model]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, model]
  name: model
  semantic_type: type/Category
  settings: null
  visibility_type: normal
- base_type: type/Text
  coercion_strategy: null
  description: Metabot profile that issued the call (e.g. internal, slackbot).
  display_name: Profile ID
  effective_type: type/Text
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, profile_id]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, profile_id]
  name: profile_id
  semantic_type: type/Category
  settings: null
  visibility_type: normal
- base_type: type/Integer
  coercion_strategy: null
  description: Prompt tokens consumed for this call.
  display_name: Prompt Tokens
  effective_type: type/Integer
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, prompt_tokens]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, prompt_tokens]
  name: prompt_tokens
  semantic_type: type/Quantity
  settings: null
  visibility_type: normal
- base_type: type/Integer
  coercion_strategy: null
  description: Completion tokens generated for this call.
  display_name: Completion Tokens
  effective_type: type/Integer
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, completion_tokens]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, completion_tokens]
  name: completion_tokens
  semantic_type: type/Quantity
  settings: null
  visibility_type: normal
- base_type: type/Integer
  coercion_strategy: null
  description: Total tokens for this call (prompt + completion).
  display_name: Total Tokens
  effective_type: type/Integer
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, total_tokens]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, total_tokens]
  name: total_tokens
  semantic_type: type/Quantity
  settings: null
  visibility_type: normal
- base_type: type/Text
  coercion_strategy: null
  description: ID of the owning Metabot conversation, if any (null for non-conversational and most Slack-originated calls).
  display_name: Conversation ID
  effective_type: type/Text
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, conversation_id]
  - null
  fk_target_field_id: [Internal Metabase Database, public, v_metabot_conversations, conversation_id]
  id: [Internal Metabase Database, public, v_ai_usage_log, conversation_id]
  name: conversation_id
  semantic_type: type/FK
  settings: null
  visibility_type: normal
- base_type: type/Integer
  coercion_strategy: null
  description: ID of the user who triggered the call (null for system/Quartz calls).
  display_name: User ID
  effective_type: type/Integer
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, user_id]
  - null
  fk_target_field_id: [Internal Metabase Database, public, v_users, user_id]
  id: [Internal Metabase Database, public, v_ai_usage_log, user_id]
  name: user_id
  semantic_type: type/FK
  settings: null
  visibility_type: normal
- base_type: type/Text
  coercion_strategy: null
  description: Synthetic 'user_<id>' string used as a stable bucket key in by-user breakouts.
  display_name: User Qualified ID
  effective_type: type/Text
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, user_qualified_id]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, user_qualified_id]
  name: user_qualified_id
  semantic_type: type/Category
  settings: null
  visibility_type: normal
- base_type: type/Text
  coercion_strategy: null
  description: Display name of the user (full name when set, otherwise email).
  display_name: User Display Name
  effective_type: type/Text
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, user_display_name]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, user_display_name]
  name: user_display_name
  semantic_type: type/Name
  settings: null
  visibility_type: normal
- base_type: type/Text
  coercion_strategy: null
  description: Name of one permissions group the user belongs to (excluding All Users); used for cohort breakdowns.
  display_name: Group Name
  effective_type: type/Text
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, group_name]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, group_name]
  name: group_name
  semantic_type: type/Category
  settings: null
  visibility_type: normal
- base_type: type/Text
  coercion_strategy: null
  description: IP address of the originating Metabot conversation, when one exists.
  display_name: IP Address
  effective_type: type/Text
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, ip_address]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, ip_address]
  name: ip_address
  semantic_type: null
  settings: null
  visibility_type: normal
- base_type: type/Integer
  coercion_strategy: null
  description: Tenant ID associated with the call, if any.
  display_name: Tenant ID
  effective_type: type/Integer
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, tenant_id]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, tenant_id]
  name: tenant_id
  semantic_type: type/FK
  settings: null
  visibility_type: normal
- base_type: type/Text
  coercion_strategy: null
  description: Stable identifier for a single user turn; multiple usage_log rows share a request_id across agent iterations.
  display_name: Request ID
  effective_type: type/Text
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, request_id]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, request_id]
  name: request_id
  semantic_type: type/Category
  settings: null
  visibility_type: normal
- base_type: type/Integer
  coercion_strategy: null
  description: Input tokens written to the provider prompt cache (Anthropic cache_creation_input_tokens). Subset of Prompt Tokens.
  display_name: Cache Creation Tokens
  effective_type: type/Integer
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, cache_creation_tokens]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, cache_creation_tokens]
  name: cache_creation_tokens
  semantic_type: type/Quantity
  settings: null
  visibility_type: normal
- base_type: type/Integer
  coercion_strategy: null
  description: Input tokens served from the provider prompt cache (Anthropic cache_read_input_tokens). Subset of Prompt Tokens.
  display_name: Cache Read Tokens
  effective_type: type/Integer
  field_ref:
  - field
  - [Internal Metabase Database, public, v_ai_usage_log, cache_read_tokens]
  - null
  fk_target_field_id: null
  id: [Internal Metabase Database, public, v_ai_usage_log, cache_read_tokens]
  name: cache_read_tokens
  semantic_type: type/Quantity
  settings: null
  visibility_type: normal
visualization_settings:
  column_settings: null
card_schema: 23
serdes/meta:
- {id: joMVMZY847nXW3WBi-zIn, label: ai_usage_log, model: Card}
type: model