docstr: Proxy export metrics specified by a Opencensus Protobuf.
  
  This API is used to export metrics emitted from
  core components.
  
  Args:
      metrics: A list of protobuf Metric defined from OpenCensus.
      worker_id_hex: The worker ID it proxies metrics export. None
          if the metric is not from a worker (i.e., raylet, GCS).
docstr_tok: ["Proxy","export","metrics","specified","by","a","Opencensus","Protobuf",".","This","API","is","used","to","export","metrics","emitted","from","core","components",".","Args",":","metrics",":","A","list","of","protobuf","Metric","defined","from","OpenCensus",".","worker_id_hex",":","The","worker","ID","it","proxies","metrics","export",".","None","if","the","metric","is","not","from","a","worker","(","i.e.",",","raylet",",","GCS",")","."]
code: def proxy_export_metrics(
      self, metrics: List[Metric], worker_id_hex: str = None
  ):
      """Proxy export metrics specified by a Opencensus Protobuf.
  
      This API is used to export metrics emitted from
      core components.
  
      Args:
          metrics: A list of protobuf Metric defined from OpenCensus.
          worker_id_hex: The worker ID it proxies metrics export. None
              if the metric is not from a worker (i.e., raylet, GCS).
      """
      with self._lock:
          if not self.view_manager:
              return
  
      self._proxy_export_metrics(metrics, worker_id_hex)
  
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 4 for calling the MetricsAgent obj's underlying member method code with example usage: obj.proxy_export_metrics(metrics, worker_id_hex) without return types