JSON Schema Monitors

JSON Schema Monitors detect anomalies in the structure of semi-structured data (JSON) stored within a table field. These monitors use Monte Carlo’s data science heuristics to identify broad schema-level anomalies rather than exact diffs of individual rows. This approach helps catch meaningful structural issues without generating noisy or overly frequent alerts.

Schema detection is evaluated over a 21-day rolling window. Fields are tracked based on their appearance rates across this period. For example, if a new field is added and appears consistently across data buckets, Monte Carlo will compare its appearance rate to previous periods to determine whether the change is anomalous. Incidents are triggered only when changes are statistically significant, typically when differences exceed a 5% threshold.

Rare fields (those that only sometimes appear) are handled with additional detection logic, though the monitor is primarily designed to identify broad schema anomalies rather than edge-case fluctuations.

Creating JSON Schema Monitors

JSON Schema Monitors can be created from the Create Monitor page. Configuration steps include:

Choose data

Select which table and JSON field to monitor.

Select table: pick the table or view that contains the JSON field.

Select field: choose the specific field that stores JSON data.

Monitor for field anomalies:

  • Recently added data: evaluates only new data as defined by a timestamp field or SQL expression.
  • All records: evaluates all data in the selected table.

Filter for recently added data:

  • Timestamp field: specify a field that defines when rows are considered “new.”
  • SQL expression: apply a custom SQL filter for new rows.

Define schema anomaly detection

Monte Carlo evaluates schema consistency over time rather than row-by-row diffs. Internally, the monitor:

  • Buckets data into windows (default: 21 days).
  • Tracks the percentage of rows containing each field in the JSON.
  • Compares changes in field presence rates across buckets.
  • Generates incidents when differences are statistically significant (e.g., >5% rate difference).

This means that if a new field appears suddenly and consistently across data, the monitor will catch it once enough time has passed to establish a stable baseline.

Send notifications

Select which audiences should receive notifications when a schema anomaly is detected.

Text in the Notes section will be included directly in notifications. The "Show notes tips" dropdown includes details on how to @mention an individual or team if you are sending notifications to Slack.

Additional settings exist for customizing the description of the monitor, pre-setting a severity on any incidents generated by the monitor, or for turning off failure notifications.

Add details

Give the monitor a title, add tags, and optionally set a priority. These details help organize and filter monitors across your Monte Carlo workspace.