Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Success markers telemetry #10065

Merged
merged 20 commits into from
Nov 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document telemetry functions
  • Loading branch information
usc-m committed Nov 3, 2021
commit 1b4535a53ad366f6e360efabde852fef10295117
25 changes: 25 additions & 0 deletions rasa/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,16 @@ def track_nlu_model_test(test_data: "TrainingData") -> None:
def track_markers_extraction_initiated(
strategy: Text, only_extract: bool, seed: Optional[int], count: Optional[int],
) -> None:
"""Track when a user tries to extract success markers.

Args:
strategy: The strategy the user is using for tracker selection
only_extract: Indicates if the user is only extracting markers or also
producing stats
seed: (Optional) The seed used if strategy is 'sample' and the user selects
one
count: (Optional) The number of trackers the user is trying to select.
"""
_track(
TELEMETRY_MARKERS_EXTRACTION_INITIATED_EVENT,
{
Expand All @@ -1028,20 +1038,35 @@ def track_markers_extraction_initiated(

@ensure_telemetry_enabled
def track_markers_extracted(trackers_count: int) -> None:
"""Track when markers have been extracted by a user.

Args:
trackers_count: The actual number of trackers processed
"""
_track(
TELEMETRY_MARKERS_EXTRACTED_EVENT, {"trackers_count": trackers_count},
)


@ensure_telemetry_enabled
def track_markers_stats_computed(trackers_count: int) -> None:
"""Track when stats over markers have been computed by a user.

Args:
trackers_count: The actual number of trackers processed
"""
_track(
TELEMETRY_MARKERS_STATS_COMPUTED_EVENT, {"trackers_count": trackers_count},
)


@ensure_telemetry_enabled
def track_markers_parsed_count(marker_count: int) -> None:
"""Track when markers have been successfully parsed from config.

Args:
marker_count: The number of markers found in the config
"""
_track(
TELEMETRY_MARKERS_PARSED_COUNT, {"marker_count": marker_count},
)