What you will be able to do
- Set default log_level, trace_level, metric_level and log_event_level in the manifest and explain what happens when they are missing
- Declare required and optional event definitions in telemetry_event_definitions
- Trace where an app's telemetry is stored in the consumer account and how a shared copy reaches the provider
- Set up a provider event account and active event table, and name who pays for shared events
- Gate parts of a Streamlit UI on the viewer's application role by choosing the right IS_APPLICATION_ROLE_ACTIVATED context
Key concept
Levels emit, event definitions filter — The log and trace levels in the manifest decide what telemetry the app produces at all. Event definitions are a second layer that only decides which of those records the consumer shares with the provider.
1.Default log and trace levels in the manifest
A Native App runs in the consumer's account, so the provider can't attach a debugger to it. Telemetry is how a provider finds out what the app is doing there: log messages about the state of a piece of code, trace events that group work across several parts of the code, and metrics on the CPU and memory used by stored procedures and UDFs. All three are switched on in the configuration block of manifest.yml.
configuration:
...
log_level: INFO
trace_level: ALWAYS
metric_level: ALL
log_event_level: INFO
...Each property controls its own stream. log_level sets which log messages are captured. Without it, the default log data is not captured. trace_level turns on tracing, and tracing automatically records the start and end of every query and stored procedure call. metric_level emits auto-instrumented resource metrics. log_event_level, introduced in BCR bundle 2026_02, controls which application lifecycle events (RECORD_TYPE=EVENT) are recorded, separately from log messages. Its values run from TRACE through FATAL, plus OFF.
Choose the levels carefully before you publish. Once an app is published, its log and trace levels cannot be changed. The trace level also has a privacy cost. Any trace_level other than OFF can expose calls to hidden stored procedures to any user in the consumer account who can read the event table.
The manifest sets defaults for the whole app. Inside the setup script you can override them for individual objects. Use ALTER SCHEMA, ALTER PROCEDURE or ALTER FUNCTION ... SET for schemas, stored procedures and UDFs, and CREATE OR ALTER VERSIONED SCHEMA for versioned schemas. The properties you can set this way are LOG_LEVEL, TRACE_LEVEL and METRIC_LEVEL. Containerized apps are the exception: their telemetry levels go in the service specification, and the manifest log_level does not propagate into containers.
Checkpoint 1 of 8· Fill the gap
A provider wants the app to emit logs, traces, metrics and lifecycle events by default. Which top-level manifest block holds these settings?
? :
...
log_level: INFO
trace_level: ALWAYS
metric_level: ALL
log_event_level: INFO
...The default log, trace, metric and event levels go in the manifest's configuration block, and they decide what the app emits at all. telemetry_event_definitions only filters which of those records the consumer shares with the provider. It cannot make the app emit anything.
Source: docs.snowflake.com2.Event definitions: required and optional filters
Event definitions decide which of the emitted records are shared with the provider. The consumer still receives everything the levels produce. A provider lists event definitions under configuration.telemetry_event_definitions and marks each one MANDATORY or OPTIONAL. They are set per version or patch, when that version or patch is published. The consumer never chooses which definitions are required.
configuration:
telemetry_event_definitions:
- type: ERRORS_AND_WARNINGS
sharing: MANDATORY
- type: DEBUG_LOGS
sharing: OPTIONAL| Event definition | Shares |
|---|---|
| SNOWFLAKE$ALL | Every log message and trace event the app emits |
| SNOWFLAKE$ALL_EVENTS | Records with RECORD_TYPE EVENT |
| SNOWFLAKE$ERRORS_AND_WARNINGS | LOG records with severity FATAL, ERROR or WARN |
| SNOWFLAKE$TRACES | SPAN and SPAN_EVENT records |
| SNOWFLAKE$USAGE_LOGS | LOG records with severity INFO |
| SNOWFLAKE$DEBUG_LOGS | LOG records with severity DEBUG or TRACE |
| SNOWFLAKE$METRICS | METRIC records |
Required definitions are switched on automatically when the app is installed. Afterwards the consumer cannot disable event sharing or any required definition. A consumer who won't share that data cannot install the app, so installing is the act of accepting it. On upgrade, providers can use system functions or the Python Permission SDK to check that every required definition is enabled. Optional definitions are the consumer's choice and can be switched on or off at any time without blocking installation.
The two layers also affect each other at runtime. When a consumer enables event definitions, Snowflake raises the app's log and trace levels to the most verbose ones those definitions allow. For example, enabling DEBUG_LOGS lets debug-level records through even if the manifest default is quieter.
Event definitions are optional for the provider too. An app without them gives the consumer a single all-or-nothing switch, and Snowsight shows only the All type. Older event sharing behaves like an OPTIONAL ALL definition, so an existing app already works that way. To move to finer-grained sharing, add definitions to the manifest of a new version or patch. Nothing else needs to change. Apps that use Snowpark Container Services currently support only SNOWFLAKE$ALL.
Checkpoint 2 of 8· Check yourself
After installing an app, a consumer's security team wants to stop sharing all telemetry with the provider. The app's manifest declares ERRORS_AND_WARNINGS with sharing: MANDATORY and DEBUG_LOGS with sharing: OPTIONAL. What can the consumer do?
The provider marks a definition MANDATORY or OPTIONAL in the manifest, and the consumer cannot change that. Optional definitions can be switched on or off at any time. Required ones are switched on at install, and the consumer cannot disable them or event sharing afterwards.
“After installing an app with required event definitions, consumers cannot disable event sharing or the required event definitions.”Source: docs.snowflake.com
Checkpoint 3 of 8· Exam question
Which of the following statements about required and optional events in a Native App's event definitions are correct?(Select 3)
Correct answers: A, B, D — A required event must be approved by the consumer or the app cannot be installed; An optional event can be enabled or disabled by the consumer at any time without blocking installation; Legacy apps that predate event definitions default to an "OPTIONAL ALL" event definition automatically
- A. A required event definition blocks installation until the consumer approves sharing for it, which is what distinguishes it from an optional one.
- B. Optional events do not block installation, and the consumer retains the ability to toggle sharing for them afterward.
- C. Required versus optional status is declared by the provider in the manifest's event definitions, not chosen by the consumer when creating an event table.
- D. Apps built before event definitions existed automatically fall back to an "OPTIONAL ALL" definition so they keep functioning without manifest changes.
- E. Optional events can still be shared with the provider if the consumer chooses to approve sharing for them; the optional label only means approval is not mandatory.
- F. Required event definitions are not restricted to container-based apps; they apply to the general event definition mechanism for Native Apps.
3.Where telemetry lands and how the consumer approves sharing
App telemetry is written first to the active event table in the consumer account. If the consumer has done nothing, that table is SNOWFLAKE.TELEMETRY.EVENTS, which is active in every account by default. A consumer who wants app telemetry kept apart from other account events can create a custom event table and make it active instead. Snowflake ships two database roles for access: EVENTS_ADMIN manages row-access policies and deletes data, and EVENTS_VIEWER has read-only access to the masked SNOWFLAKE.TELEMETRY.EVENTS_VIEW.
After installation, the app's event definitions appear in the Events and logs tab on the app's Security page. This is where the consumer enables sharing and switches optional definitions on or off. From then on, each record that passes an enabled definition is also inserted into the provider's event table. There is no daily batch, no file export, and the provider never queries the consumer's table.
Sharing does not depend on the consumer keeping a local copy. If the consumer sets its event table to NONE, the events are not stored in the consumer account, but they are still shared with the provider. Turning off local storage is not a way to opt out of required definitions.
No. NONE stops events from being stored in the consumer account, but shared events still go to the provider. If ERRORS_AND_WARNINGS is a required definition, the consumer cannot switch that sharing off either.
Checkpoint 4 of 8· Check yourself
A consumer's compliance team wants an auditor to read the app telemetry stored in their account. The auditor must not be able to delete event data or change row-access policies. What should they set up?
EVENTS_VIEWER gives read-only access to the masked SNOWFLAKE.TELEMETRY.EVENTS_VIEW. EVENTS_ADMIN can also delete data and manage row-access policies. Setting the table to NONE stops events from being stored in the consumer account, and the shared copy goes to the provider's event table. Event definitions only filter what is shared with the provider. They do not control who in the consumer account can read the records.
“EVENTS_ADMIN (manage row-access policies and delete data) and EVENTS_VIEWER (read-only access to the masked SNOWFLAKE.TELEMETRY.EVENTS_VIEW)”Source: docs.snowflake.com
Checkpoint 5 of 8· Exam question
A support engineer is investigating where a newly installed Native App's telemetry data is being stored, and the consumer has not configured any custom event table. Which event table holds this data by default?
Correct answer: A — SNOWFLAKE.TELEMETRY.EVENTS
- A. Every Snowflake account has this table available out of the box, and it is where telemetry lands when no custom event table has been configured.
- B. This is a usage/billing metadata schema, not the default destination for application telemetry such as logs and traces.
- C. This is not a real Snowflake system object; no such default event table exists under this name.
- D. INFORMATION_SCHEMA exposes metadata about database objects, not a destination for log or trace telemetry.
Checkpoint 6 of 8· Exam question
When event sharing is enabled for a Native App, how does telemetry data actually reach the provider's account?
Correct answer: A — Log and trace records written to the consumer's event table are copied to the provider's event table at the same time
- A. Event sharing works by writing matching telemetry to both the consumer's and provider's event tables simultaneously as it is emitted, not through a batch or export process.
- B. There is no daily full-table replication mechanism for event sharing; sharing happens at write time for matching records.
- C. There is no CSV export or stage-based download step involved in event sharing between consumer and provider event tables.
- D. Providers do not directly query consumer event tables through role impersonation; the sharing mechanism writes qualifying events to the provider's own event table instead.
4.Provider event accounts, privacy and costs
Shared events can only be collected in the region where the consumer installed the app. That decides how the provider has to set up. In each region where consumers will share events, the provider needs an event account that has an active event table, and it must exist before consumers install. If it doesn't, the shared copy from that region is dropped. The consumer's own table still keeps its local copy. Snowflake strongly recommends centralized event sharing for new deployments. The per-region setup below is for deployments where that isn't an option.
| Step | Command | Constraint |
|---|---|---|
| Choose the region's event account | SYSTEM$SET_EVENT_SHARING_ACCOUNT_FOR_REGION | Requires an organization administrator role; cannot be a locked, suspended, reader, trial or Snowflake managed account |
| Create the table | CREATE EVENT TABLE | An account can hold several event tables |
| Make it active | ALTER ACCOUNT SET EVENT_TABLE | Only one event table is active at a time |
| Review the setup | SYSTEM$SHOW_EVENT_SHARING_ACCOUNTS | May lag briefly while metadata reaches all regions |
ALTER ACCOUNT SET EVENT_TABLE=event_db.event_schema.my_event_table;The consumer's identity is protected before any event leaves their account. Each shared record carries RESOURCE_ATTRIBUTES such as the package name, the consumer account locator, the organization, the region and the listing name. Database, query and application identifiers are replaced with SHA-1 hashes (snow.database.hash, snow.query.hash, snow.application.hash). Warehouse names, session IDs, user names and role names are left out entirely. To match a shared event to a local query, the consumer can call SYSTEM$GET_HASH_FOR_APPLICATION or compute the same SHA-1 values.
The provider pays for shared events. All ingestion and storage costs on the provider side fall on the provider. A broad optional definition such as SNOWFLAKE$ALL is more data you pay to store, so ask for only the definitions you will actually use.
Checkpoint 7 of 8· Put it in order
Your team will start offering the app to consumers in a new region and wants to receive their shared events without per-region data loss. Put the provider-side steps in order.
- 1.Run CREATE EVENT TABLE in the event account
- 2.Run ALTER ACCOUNT SET EVENT_TABLE so the new table becomes the account's active event table
- 3.Let consumers in that region install the app and enable event sharing
- 4.Use an organization administrator role to call SYSTEM$SET_EVENT_SHARING_ACCOUNT_FOR_REGION and choose that region's event account
The event account must be chosen before a table can be created in it, and the table only receives shared events once it is the active event table. All of this must be done before consumers install. Otherwise the shared copy from that region is dropped, and only the consumer's local table keeps the events.
“After creating the event table, use ALTER ACCOUNT … SET EVENT_TABLE to specify that the event table is the active table for the account”Source: docs.snowflake.com
5.Checking application roles from Streamlit code
A Streamlit page inside an app often has to show different things to different viewers: an admin tab for one application role, a read-only dashboard for another. The page decides by asking Snowflake whether a given application role is activated, and the answer depends on which context you ask about.
The check is SYS_CONTEXT('SNOWFLAKE$APPLICATION', 'IS_APPLICATION_ROLE_ACTIVATED', <context>, <app_role>). Pass the bare role name. Qualifying it with the app name is a mistake, because the function works out the application from where it is called. The result is the VARCHAR 'TRUE' or 'FALSE', so cast it to BOOLEAN before comparing it with TRUE. An invalid role name also returns 'FALSE' rather than an error, which makes a typo in the role name look like a viewer who lacks access.
SELECT SYS_CONTEXT('SNOWFLAKE$APPLICATION', 'IS_APPLICATION_ROLE_ACTIVATED', 'SESSION', 'my_app_role');The context argument is the part that matters. SESSION looks at the primary and secondary roles of the current session, which is the viewer. ACTIVE looks at the role executing the current call. Inside an owner's rights procedure, or inside a Streamlit, the active roles can differ from the session roles, so an ACTIVE check answers a question about the owner rather than the person looking at the page. To gate a UI element on who is viewing it, use SESSION.
IS_APPLICATION_ROLE_IN_SESSION is the older single-purpose form, and it only works when called from within an app. It checks the consumer's current session and does not return TRUE when the app itself calls it, because application roles are owned by the app but not granted to it.
Checkpoint 8 of 8· Check yourself
A Streamlit page should show an Admin tab only to viewers whose session holds the application role app_admin. Which call does that?
SESSION asks about the viewer's own roles. ACTIVE asks about the role running the call, which in a Streamlit can differ from the session roles. The role name must not be qualified with the app name, and IS_ROLE_IN_SESSION is for account roles, not application roles.
“SESSION: Checks if the application role is in the role hierarchy of the current session’s primary or secondary roles.”Source: docs.snowflake.com
Sources
(6)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“After you publish an app, the log and trace levels cannot be changed.”
↩︎ Default log and trace levels in the manifest“The manifest log_level does not propagate into containers.”
↩︎ Default log and trace levels in the manifest“consumers cannot disable event sharing or the required event definitions”
↩︎ Event definitions: required and optional filters“Snowflake uses the most verbose log and trace levels allowed by the event definitions the consumer has enabled.”
↩︎ Event definitions: required and optional filters“Snowflake Native Apps with Snowpark Container Services currently only support the SNOWFLAKE$ALL event definition.”
↩︎ Event definitions: required and optional filters“the event definitions appear in the Events and logs tab on the Security page of the app”
↩︎ Where telemetry lands and how the consumer approves sharing“Event definitions are filters that act on the log messages and trace events.”
↩︎ Key concept“Required event definitions are enabled automatically when the app is installed.”
↩︎ Exam trap 1“Log and tracing levels determine the information that is inserted into the consumer event table.”
↩︎ Exam trap 3“If neither the log nor tracing levels are set, then the app does not emit any events.”
↩︎ Prediction“After installing an app with required event definitions, consumers cannot disable event sharing or the required event definitions.”
↩︎ Checkpoint - 2.
“Publishing an app with the trace_level property set to a value other than OFF might expose calls to hidden stored procedures”
↩︎ Default log and trace levels in the manifest - 3.
“The previous event sharing functionality is equivalent to the OPTIONAL ALL event definition.”
↩︎ Event definitions: required and optional filters“The default SNOWFLAKE.TELEMETRY.EVENTS table is active in every account out of the box.”
↩︎ Where telemetry lands and how the consumer approves sharing“When event sharing is enabled, the log messages and trace events are inserted into the event table in the provider account.”
↩︎ Where telemetry lands and how the consumer approves sharing“Providers are responsible for all costs associated with event sharing on the provider side, including data ingestion and storage.”
↩︎ Provider event accounts, privacy and costs“If the consumer sets the event table to NONE, the events are not stored in the consumer account. They are still shared with the provider.”
↩︎ Exam trap 2“EVENTS_ADMIN (manage row-access policies and delete data) and EVENTS_VIEWER (read-only access to the masked SNOWFLAKE.TELEMETRY.EVENTS_VIEW)”
↩︎ Checkpoint - 4.
“A provider can collect logs and shared events only in the same region where a consumer installs an app.”
↩︎ Provider event accounts, privacy and costs“Without an active event table, log messages and trace events that the consumer shares are discarded.”
↩︎ Provider event accounts, privacy and costs“After creating the event table, use ALTER ACCOUNT … SET EVENT_TABLE to specify that the event table is the active table for the account”
↩︎ Checkpoint - 5.
“Do not qualify the role name with the name of the application.”
↩︎ Checking application roles from Streamlit code“Do not qualify the role name with the name of the application.”
↩︎ Exam trap 4“SESSION: Checks if the application role is in the role hierarchy of the current session’s primary or secondary roles.”
↩︎ Checkpoint - 6.
“The currently active roles can differ from the session roles, for example, when executing an owner’s rights procedure or a Streamlit.”
↩︎ Checking application roles from Streamlit code