docstr: Record the metrics reported from the component that reports it.
  
  Args:
      metrics: A list of opencensus protobuf to proxy export metrics.
      worker_id_hex: A worker id that reports these metrics.
          If None, it means they are reported from Raylet or GCS.
docstr_tok: ["Record","the","metrics","reported","from","the","component","that","reports","it",".","Args",":","metrics",":","A","list","of","opencensus","protobuf","to","proxy","export","metrics",".","worker_id_hex",":","A","worker","id","that","reports","these","metrics",".","If","None",",","it","means","they","are","reported","from","Raylet","or","GCS","."]
code: def record(self, metrics: List[Metric], worker_id_hex: str = None):
      """Record the metrics reported from the component that reports it.
  
      Args:
          metrics: A list of opencensus protobuf to proxy export metrics.
          worker_id_hex: A worker id that reports these metrics.
              If None, it means they are reported from Raylet or GCS.
      """
      key = GLOBAL_COMPONENT_KEY if not worker_id_hex else worker_id_hex
      with self._components_lock:
          if key not in self._components:
              self._components[key] = Component(key)
          self._components[key].record(metrics)
  
imports: import json
  import logging
  import os
  import re
  import threading
  import time
  import traceback
  from collections import namedtuple
  from typing import List, Tuple, Any, Dict
  from prometheus_client.core import CounterMetricFamily, GaugeMetricFamily, HistogramMetricFamily
  from opencensus.metrics.export.value import ValueDouble
  from opencensus.stats import aggregation
  from opencensus.stats import measure
  from opencensus.stats.view_manager import ViewManager
  from opencensus.stats.stats_recorder import StatsRecorder
  from opencensus.stats.base_exporter import StatsExporter
  from prometheus_client.core import Metric
  from opencensus.stats.aggregation_data import CountAggregationData, DistributionAggregationData, LastValueAggregationData
  from opencensus.stats.view import View
  from opencensus.tags import tag_key
  from opencensus.tags import tag_map
  from opencensus.tags import tag_value
  import ray
  from ray._raylet import GcsClient
  from ray.core.generated.metrics_pb2 import Metric
label_desc: Use image node_id 2 for calling the OpenCensusProxyCollector obj's underlying member method code with example usage: obj.record(metrics, worker_id_hex) without return types