Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Alert metrics in PostHog #26381

Merged
merged 5 commits into from
Nov 26, 2024
Merged

feat: Alert metrics in PostHog #26381

merged 5 commits into from
Nov 26, 2024

Conversation

anirudhpillai
Copy link
Contributor

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

Copy link

sentry-io bot commented Nov 25, 2024

🔍 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 👎

@@ -72,6 +73,8 @@ def __init__(self, err: Exception):
"Number of alerts we calculated",
)

ANIRUDH_DISTINCT_ID = "wcPbDRs08GtNzrNIXfzHvYAkwUaekW7UrAo4y3coznT"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lmk if someone has a better idea of what to use instead 😅

@anirudhpillai anirudhpillai enabled auto-merge (squash) November 25, 2024 13:55
@anirudhpillai anirudhpillai requested a review from a team November 26, 2024 10:01
@anirudhpillai anirudhpillai merged commit 54c7435 into master Nov 26, 2024
89 checks passed
@anirudhpillai anirudhpillai deleted the feat/alerts-posthog branch November 26, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants