Logging and tracing: Logging of unhandled exceptions in handler code on by default

Attention

This behavior change is in the 2023_08 bundle.

For the current status of the bundle, refer to Bundle History.

Logging of unhandled exceptions in procedure and UDF handler code behaves as follows:

Before the change:

When an event table has been associated with the Snowflake account, an unhandled exception occurring in procedure or UDF handler code won’t, by default, be logged in the event table.

In other words, you can set up logging and tracing, including creating an event table and associating it with your account, but leave unhandled exception logging off, such as to avoid having those exceptions logged. You can turn on exception logging by setting the ENABLE_UNHANDLED_EXCEPTIONS_REPORTING parameter to true.

After the change:

Unhandled exceptions in procedure or UDF handler code do, by default, result in log entries when you have an event table associated with the account.

You can turn off logging for unhandled exceptions by setting the ENABLE_UNHANDLED_EXCEPTIONS_REPORTING parameter to false.

When log entries might contain sensitive data, consider doing the following to protect the data:

  • Turn off unhandled exception logging.

  • If you leave unhandled exception logging on, take steps to protect sensitive data, such as by doing the following:

    • Improve your exception handling code to minimize the risk of unhandled exceptions.

    • Apply row access policies to your event table to restrict access to rows that contain personally identifiable information (PII).

    • Create a view on top of the event table and apply masking policies to it to mask or delete personally identifiable information (PII).

Ref: 1428

Language: English