MT Cloud Monitoring (#3465)

This commit is contained in:
Yuhong Sun
2024-12-15 16:05:03 -08:00
committed by GitHub
parent 4f5a2b47c4
commit 814f97c2c7
19 changed files with 413 additions and 8 deletions

View File

@@ -0,0 +1,14 @@
from posthog import Posthog
from ee.onyx.configs.app_configs import POSTHOG_API_KEY
from ee.onyx.configs.app_configs import POSTHOG_HOST
posthog = Posthog(project_api_key=POSTHOG_API_KEY, host=POSTHOG_HOST)
def event_telemetry(
distinct_id: str,
event: str,
properties: dict | None = None,
) -> None:
posthog.capture(distinct_id, event, properties)