# Rasa Telemetry Functions

You are viewing documentation for our open source project which is maintained by the community. If you want to get started building assistants with Rasa, please check out our latest [documentation here](/content/docs/index.html).

#### print_telemetry_reporting_info
```python
def print_telemetry_reporting_info() -> None
    """Print telemetry information to std out."""
```

#### is_telemetry_enabled
```python
def is_telemetry_enabled() -> bool
    """Check if telemetry is enabled either in configuration or environment."""
    # Returns:
    # True if telemetry is enabled, False otherwise.
```

#### initialize_telemetry
```python
def initialize_telemetry() -> bool
    """Read telemetry configuration from the user's Rasa config file in $HOME."""
    # Creates a default configuration if no configuration exists.
    # Returns:
    # True if telemetry is enabled, False otherwise.
```

#### ensure_telemetry_enabled
```python
def ensure_telemetry_enabled(f: Callable[..., Any]) -> Callable[..., Any]
    """Function decorator for telemetry functions that ensures telemetry is enabled."""
    # WARNING: does not work as a decorator for async generators.
    # Arguments:
    # - f: function to call if telemetry is enabled
    # Returns:
    # Return wrapped function
```

#### telemetry_write_key
```python
def telemetry_write_key() -> Optional[Text]
    """Read the Segment write key from the segment key text file."""
    # Returns:
    # Segment write key, if the key file was present.
```

#### segment_request_header
```python
def segment_request_header(write_key: Text) -> Dict[Text, Any]
    """Use a segment write key to create authentication headers for the segment API."""
    # Arguments:
    # - write_key: Authentication key for segment.
    # Returns:
    # Authentication headers for segment.
```

#### segment_request_payload
```python
def segment_request_payload(distinct_id: Text, event_name: Text,
                            properties: Dict[Text, Any],
                            context: Dict[Text, Any]) -> Dict[Text, Any]
    """Compose a valid payload for the segment API."""
    # Arguments:
    # - distinct_id: Unique telemetry ID.
    # - event_name: Name of the event.
    # - properties: Values to report along the event.
    # - context: Context information about the event.
    # Returns:
    # Valid segment payload.
```

#### in_continuous_integration
```python
def in_continuous_integration() -> bool
    """Returns True if currently running inside a continuous integration context."""
```

#### track_model_training
```python
def track_model_training(training_data: "TrainingDataImporter",
                         model_type: Text,
                         is_finetuning: bool = False) -> typing.Generator[None, None, None]
    """Track a model training started."""
    # Arguments:
    # - training_data: Training data used for the training.
    # - model_type: Specifies the type of training, should be either "rasa", "core" or "nlu".
    # - is_finetuning: True if the model is trained by finetuning another model.
```

#### toggle_telemetry_reporting
```python
def toggle_telemetry_reporting(is_enabled: bool) -> None
    """Write to the configuration if telemetry tracking should be enabled or disabled."""
    # Arguments:
    # - is_enabled: True if the telemetry reporting should be enabled, False otherwise.
```

#### track_interactive_learning_start
```python
def track_interactive_learning_start(skip_visualization: bool,
                                        save_in_e2e: bool) -> None
    """Track when a user starts an interactive learning session."""
    # Arguments:
    # - skip_visualization: Is visualization skipped in this session
    # - save_in_e2e: Is e2e used in this session
```
