mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-25 19:37:29 +02:00
MT Cloud Monitoring (#3465)
This commit is contained in:
14
backend/ee/onyx/utils/telemetry.py
Normal file
14
backend/ee/onyx/utils/telemetry.py
Normal 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)
|
Reference in New Issue
Block a user