Skip to content

Commit

Permalink
add back tutorial_running() (#4534)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanSara committed Mar 29, 2023
1 parent 7821619 commit 16bd7d0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions haystack/telemetry.py
Expand Up @@ -101,6 +101,14 @@ def send_event(self, event_name: str, event_properties: Optional[Dict[str, Any]]
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,
Expand Down

0 comments on commit 16bd7d0

Please sign in to comment.