Currently when a plugin errors, it gets autodisabled. This is however completely silent and easy to miss. The result can be degraded data quality or a hole in data in case of export plugins – something to be fixed ASAP.

A PagerDuty integration could come in useful here, allowing an alert to be sent in case of a plugin getting disabled. PagerDuty is tailored for this kind of thing, so this would potentially be better than e.g. an email – that could be easily missed in a sea of emails.

This problem was brought up by a current user of our Snowflake Export Plugin.
posthog/models/plugin.py
*,
    team_id: Optional[int] = None,
    plugin_config_id: Optional[int] = None,
    after: Optional[timezone.datetime] = None,
    before: Optional[timezone.datetime] = None,
    search: Optional[str] = None,
    limit: Optional[int] = None,
    type_filter: List[PluginLogEntryType] = [],
) -> List[PluginLogEntry]:
    clickhouse_where_parts: List[str] = []
    clickhouse_kwargs: Dict[str, Any] = {}
    if team_id is not None:
        clickhouse_where_parts.append("team_id = %(team_id)s")
        clickhouse_kwargs["team_id"] = team_id
    if plugin_config_id is not None:
        clickhouse_where_parts.append("plugin_config_id = %(plugin_config_id)s")
        clickhouse_kwargs["plugin_config_id"] = plugin_config_id
    if after is not None:
        clickhouse_where_parts.append("timestamp > toDateTime64(%(after)s, 6)")
        clickhouse_kwargs["after"] = after.isoformat().replace("+00:00", "")
    if before is not None: