PostHog / posthog

🦔 PostHog provides open-source web & product analytics, session recording, feature flagging and A/B testing that you can self-host. Get started - free.
https://posthog.com
Other
22.34k stars 1.35k forks source link

feat: Alert metrics in PostHog #26381

Closed anirudhpillai closed 5 days ago

anirudhpillai commented 6 days ago

Problem

Since we can't sent counters from celery jobs, sending metrics to PostHog

Changes

Send alert metrics to PostHog

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

N/A

How did you test this code?

Tested locally

sentry-io[bot] commented 6 days ago

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: posthog/tasks/alerts/checks.py

Function Unhandled Issue
check_alert_and_notify_atomically TemplateDoesNotExist: email/alert_check_failed_to_evaluate.html posthog.tasks.alerts.checks.c...
Event Count: 5.2k
check_alert ValueError: sleep length must be non-negative pos...
Event Count: 45

Did you find this useful? React with a 👍 or 👎