mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-19 12:03:54 +02:00
Migrate user milestone logic (#3493)
This commit is contained in:
@@ -2,6 +2,9 @@ from posthog import Posthog
|
||||
|
||||
from ee.onyx.configs.app_configs import POSTHOG_API_KEY
|
||||
from ee.onyx.configs.app_configs import POSTHOG_HOST
|
||||
from onyx.utils.logger import setup_logger
|
||||
|
||||
logger = setup_logger()
|
||||
|
||||
posthog = Posthog(project_api_key=POSTHOG_API_KEY, host=POSTHOG_HOST)
|
||||
|
||||
@@ -11,4 +14,5 @@ def event_telemetry(
|
||||
event: str,
|
||||
properties: dict | None = None,
|
||||
) -> None:
|
||||
logger.info(f"Capturing Posthog event: {distinct_id} {event} {properties}")
|
||||
posthog.capture(distinct_id, event, properties)
|
||||
|
Reference in New Issue
Block a user