Enable app observability
Enable observability for the RelationalAI (RAI) Native App by registering a secure view over Snowflake’s Event Table.
Once registered, the app reads metrics through that view and makes them available in the relationalai.observability_preview schema, such as reasoner memory, CPU, and workload demand.
- The RAI Native App is installed in your Snowflake account.
- You can run SQL in Snowflake with an active warehouse.
- You have
SELECTaccess on the active Snowflake Event Table.
How app observability works
Section titled “How app observability works”The Native App uses Snowflake’s Event Table to report internal metrics about app and reasoner usage, including memory, CPU, and demand.
To access those metrics, you create a secure view that filters the Event Table for relevant app-shared metric rows, then register that view with the app so it can read the metrics and make them available in the relationalai.observability_preview schema.
Register a secure events view with the RAI Native App
Section titled “Register a secure events view with the RAI Native App”Requires the observability_admin application role.
-
Find the active Event Table
Use the account setting first so the rest of the SQL points at the right table.
SHOW PARAMETERS LIKE 'EVENT_TABLE' IN ACCOUNT;SHOW TABLES LIKE 'EVENTS' IN SCHEMA SNOWFLAKE.TELEMETRY; -
Enable change tracking if needed
Registration fails if change tracking is disabled on the Event Table.
ALTER TABLE SNOWFLAKE.TELEMETRY.EVENTSSET CHANGE_TRACKING = TRUE; -
Create the filtered secure view
Create the view in a database and schema that you own. The filter keeps the view limited to RAI database rows and rows explicitly flagged for sharing with RAI.
CREATE DATABASE IF NOT EXISTS MONITORING;-- Change the schema name if needed.CREATE SCHEMA IF NOT EXISTS MONITORING.RAI_OBSERVABILITY;CREATE OR REPLACE SECURE VIEW MONITORING.RAI_OBSERVABILITY.RAI_OBSCOMMENT = 'RelationalAI Native App observability filtered events view'CHANGE_TRACKING = TRUEASSELECTTIMESTAMP,START_TIMESTAMP,RECORD_TYPE,RECORD_ATTRIBUTES,RECORD,TRACE,VALUE,RESOURCE_ATTRIBUTES['snow.executable.name'] as EXECUTABLE_NAMEFROM SNOWFLAKE.TELEMETRY.EVENTSWHERE (resource_attributes['snow.database.name']::STRING = 'RELATIONALAI'OR record_attributes['rai_share']::BOOLEAN = TRUE); -
Register the view with the app
Registration stores a persistent reference that the app uses to read the filtered telemetry.
CALL RELATIONALAI.app.REGISTER_EVENTS_VIEW(SYSTEM$REFERENCE('view','MONITORING.RAI_OBSERVABILITY.RAI_OBS','PERSISTENT','SELECT')); -
Validate the registration
Do not continue until the status check is healthy.
CALL RELATIONALAI.app.CHECK_EVENTS_VIEW_STATUS();Events view activemeans the configuration is valid and events are flowing.No events view registeredmeans setup is incomplete.ERRORmeans the registration exists but the app cannot use it yet.