class_docstr: Class to hold metric logging to be picked up by log metric filters.
  
  This basically acts as an enum, allowing for the use of dot notation for
  accessing properties and avoids doing dict lookups a ton.
class_docstr_tok: ["Class","to","hold","metric","logging","to","be","picked","up","by","log","metric","filters",".","This","basically","acts","as","an","enum",",","allowing","for","the","use","of","dot","notation","for","accessing","properties","and","avoids","doing","dict","lookups","a","ton","."]
docstr: Log a metric using the logger the list of metrics to be sent to CloudWatch
  
  Args:
      metric_name (str): Name of metric to publish to. Choices are in `Metrics.Name` above
      value (num): Numeric information to post to metric. AWS expects
          this to be of type 'float' but will accept any numeric value that
          is not super small (negative) or super large.
docstr_tok: ["Log","a","metric","using","the","logger","the","list","of","metrics","to","be","sent","to","CloudWatch","Args",":","metric_name","(","str",")",":","Name","of","metric","to","publish","to",".","Choices","are","in","`","Metrics.Name","`","above","value","(","num",")",":","Numeric","information","to","post","to","metric",".","AWS","expects","this","to","be","of","type","'float","'","but","will","accept","any","numeric","value","that","is","not","super","small","(","negative",")","or","super","large","."]
code: def log_metric(cls, lambda_function, metric_name, value):
      """Log a metric using the logger the list of metrics to be sent to CloudWatch
  
      Args:
          metric_name (str): Name of metric to publish to. Choices are in `Metrics.Name` above
          value (num): Numeric information to post to metric. AWS expects
              this to be of type 'float' but will accept any numeric value that
              is not super small (negative) or super large.
      """
      # Do not log any metrics if they have been disabled by the user
      if not ENABLE_METRICS:
          return
  
      if lambda_function not in cls._available_metrics:
          LOGGER.error(
              "Function '%s' not defined in available metrics. Options are: %s",
              lambda_function,
              ", ".join(
                  "'{}'".format(key)
                  for key in cls._available_metrics
                  if cls._available_metrics[key]
              ),
          )
          return
  
      if metric_name not in cls._available_metrics[lambda_function]:
          LOGGER.error(
              "Metric name ('%s') not defined for '%s' function. Options are: %s",
              metric_name,
              lambda_function,
              ", ".join(
                  "'{}'".format(value)
                  for value in cls._available_metrics[lambda_function]
              ),
          )
          return
  
      # Use a default format for logging this metric that will get picked up by the filters
      LOGGER.info(
          '{"metric_name": "%s", "metric_value": %s}',
          metric_name,
          value,
      )
  
imports: import os
  from streamalert.shared import ALERT_MERGER_NAME, ALERT_PROCESSOR_NAME, ATHENA_PARTITIONER_NAME, CLASSIFIER_FUNCTION_NAME, RULES_ENGINE_FUNCTION_NAME
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 1 for calling the MetricLogger obj's underlying member method code with example usage: obj.log_metric(cls, lambda_function, metric_name, value) without return types