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/tasks/email.py
import uuid
from datetime import datetime
from typing import List
import posthoganalytics
import structlog
from django.conf import settings
from django.utils import timezone
from posthog.celery import app
from posthog.email import EmailMessage, is_email_available
from posthog.event_usage import report_first_ingestion_reminder_email_sent, report_second_ingestion_reminder_email_sent
from posthog.models import Organization, OrganizationInvite, User
from posthog.models.team import Team
from posthog.utils import absolute_uri
logger = structlog.get_logger(__name__)
def send_message_to_all_staff_users(message: EmailMessage) -> None: