class_docstr: Records telemetry events to memory for testing purposes.
class_docstr_tok: ["Records","telemetry","events","to","memory","for","testing","purposes","."]
docstr: Log an event to telemetry.
docstr_tok: ["Log","an","event","to","telemetry","."]
code: def log(
      self,
      client_id: str,
      function_start_event: Optional[FunctionStartEvent] = None,
      function_end_event: Optional[FunctionEndEvent] = None,
  ) -> bool:
      """Log an event to telemetry."""
      payload = TelemetryPayload(
          client_id=client_id,
          function_start_events=(function_start_event,)
          if function_start_event
          else (),
          function_end_events=(function_end_event,)
          if function_end_event
          else (),
      )
      if len(self._payloads) > 10:
          self._payloads.pop()
  
      self._payloads.append(payload)
      return True
  
file_path: metricflow/metricflow/telemetry/handlers/handlers.py
imports: from __future__ import annotations
  import logging
  from abc import ABC, abstractmethod
  from typing import Any, Dict, List, Optional, Sequence
  from metricflow.telemetry.models import FunctionEndEvent, FunctionStartEvent, TelemetryPayload
label_desc: Use image node_id 4 for calling the ToMemoryTelemetryHandler obj's underlying member method code with example usage: obj.log(client_id, function_start_event, function_end_event) and returns: True