class_docstr: Classify, map source, and parse a raw record into its declared type.
class_docstr_tok: ["Classify",",","map","source",",","and","parse","a","raw","record","into","its","declared","type","."]
docstr: Perform some metric logging before exiting
docstr_tok: ["Perform","some","metric","logging","before","exiting"]
code: def _log_metrics(self):
      """Perform some metric logging before exiting"""
      MetricLogger.log_metric(
          FUNCTION_NAME,
          MetricLogger.TOTAL_RECORDS,
          sum(
              len(payload.parsed_records) for payload in self._payloads
          ),
      )
      MetricLogger.log_metric(
          FUNCTION_NAME,
          MetricLogger.NORMALIZED_RECORDS,
          sum(
              1
              for payload in self._payloads
              for log in payload.parsed_records
              if log.get(Normalizer.NORMALIZATION_KEY)
          ),
      )
      MetricLogger.log_metric(
          FUNCTION_NAME,
          MetricLogger.TOTAL_PROCESSED_SIZE,
          self._processed_size,
      )
  
      LOGGER.debug(
          "Invalid record count: %d", self._failed_record_count
      )
      MetricLogger.log_metric(
          FUNCTION_NAME,
          MetricLogger.FAILED_PARSES,
          self._failed_record_count,
      )
  
imports: from collections import OrderedDict
  import os
  import logging
  from streamalert.classifier.clients import SQSClient
  from streamalert.shared.firehose import FirehoseClient
  from streamalert.classifier.parsers import get_parser
  from streamalert.classifier.payload.payload_base import StreamPayload
  from streamalert.shared import config, CLASSIFIER_FUNCTION_NAME
  from streamalert.shared.artifact_extractor import ArtifactExtractor
  from streamalert.shared.exceptions import ConfigError
  from streamalert.shared.logger import get_logger
  from streamalert.shared.metrics import MetricLogger
  from streamalert.shared.normalize import Normalizer
label_desc: Use image node_id 11 for calling the Classifier obj's underlying member method code with example usage: obj._log_metrics() without return types