From 16bd7d0625e3f8f7b87e0f9d1a455f8154ce4dff Mon Sep 17 00:00:00 2001 From: ZanSara Date: Wed, 29 Mar 2023 12:20:24 +0200 Subject: [PATCH] add back tutorial_running() (#4534) --- haystack/telemetry.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/haystack/telemetry.py b/haystack/telemetry.py index 5118ddb44..e6e24f9e1 100644 --- a/haystack/telemetry.py +++ b/haystack/telemetry.py @@ -101,6 +101,14 @@ class Telemetry: logger.debug("Telemetry couldn't make a POST request to PostHog.", exc_info=e) +def tutorial_running(tutorial_id: int): + """ + Can be called when a tutorial is executed so that the tutorial_id is used to identify the tutorial and send an event. + :param tutorial_id: ID number of the tutorial + """ + send_event(event_name="Tutorial", event_properties={"tutorial.id": tutorial_id}) + + def send_pipeline_event( # type: ignore pipeline: "Pipeline", # type: ignore query: Optional[str] = None,