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
def install(self, **kwargs) -> "Plugin":
        if "organization_id" not in kwargs and "organization" in kwargs:
            kwargs["organization_id"] = kwargs["organization"].id
        if kwargs.get("plugin_type", None) != Plugin.PluginType.SOURCE:
            update_validated_data_from_url(kwargs, kwargs["url"])
            raise_if_plugin_installed(kwargs["url"], kwargs["organization_id"])
        reload_plugins_on_workers()
        return Plugin.objects.create(**kwargs)
class Plugin(models.Model):
    class PluginType(models.TextChoices):
        LOCAL = "local", "local"  
        CUSTOM = "custom", "custom"  
        REPOSITORY = "repository", "repository"  
        SOURCE = "source", "source"  
    organization: models.ForeignKey = models.ForeignKey(
        "posthog.Organization", on_delete=models.CASCADE, related_name="plugins", related_query_name="plugin"
    )
    plugin_type: models.CharField = models.CharField(
        max_length=200, null=True, blank=True, choices=PluginType.choices, default=None
    )
    is_global: models.BooleanField = models.BooleanField(default=False)