class_docstr: Collects metrics and sends them directly to metrics service.
class_docstr_tok: ["Collects","metrics","and","sends","them","directly","to","metrics","service","."]
docstr: Sends a metric to metrics service.
docstr_tok: ["Sends","a","metric","to","metrics","service","."]
code: def log_metric(self, metric_data):
      """Sends a metric to metrics service."""
  
      # this is a simplistic solution which calls BatchPutMetrics
      # on the same thread as the client code
      self._buffer.append(metric_data)
      self._drain()
  
imports: from __future__ import absolute_import
  import datetime
  import logging
  import os
  import time
  import threading
  import queue
  import dateutil.tz
  from sagemaker.session import Session
label_desc: Use image node_id 2 for calling the _SyncMetricsSink obj's underlying member method code with example usage: obj.log_metric(metric_data) without return types