class_docstr: Exporter exports stats to Prometheus, users need
      to register the exporter as an HTTP Handler to be
      able to export.
  :type options:
      :class:`~opencensus.ext.prometheus.stats_exporter.Options`
  :param options: An options object with the parameters to instantiate the
                       prometheus exporter.
  :type gatherer: :class:`~prometheus_client.core.CollectorRegistry`
  :param gatherer: A Prometheus collector registry instance.
  :type transport:
      :class:`opencensus.common.transports.sync.SyncTransport` or
      :class:`opencensus.common.transports.async_.AsyncTransport`
  :param transport: An instance of a Transpor to send data with.
  :type collector:
      :class:`~opencensus.ext.prometheus.stats_exporter.Collector`
  :param collector: An instance of the Prometheus Collector object.
class_docstr_tok: ["Exporter","exports","stats","to","Prometheus",",","users","need","to","register","the","exporter","as","an","HTTP","Handler","to","be","able","to","export",".",":","type","options",":",":","class",":","`","~opencensus.ext.prometheus.stats_exporter.Options","`",":","param","options",":","An","options","object","with","the","parameters","to","instantiate","the","prometheus","exporter",".",":","type","gatherer",":",":","class",":","`","~prometheus_client.core.CollectorRegistry","`",":","param","gatherer",":","A","Prometheus","collector","registry","instance",".",":","type","transport",":",":","class",":","`","opencensus.common.transports.sync.SyncTransport","`","or",":","class",":","`","opencensus.common.transports.async_.AsyncTransport","`",":","param","transport",":","An","instance","of","a","Transpor","to","send","data","with",".",":","type","collector",":",":","class",":","`","~opencensus.ext.prometheus.stats_exporter.Collector","`",":","param","collector",":","An","instance","of","the","Prometheus","Collector","object","."]
code: def __init__(
      self,
      options,
      gatherer,
      transport=sync.SyncTransport,
      collector=Collector(),
  ):
      self._options = options
      self._gatherer = gatherer
      self._collector = collector
      self._transport = transport(self)
      self.serve_http()
      REGISTRY.register(self._collector)
  
imports: import re
  from prometheus_client import start_http_server
  from prometheus_client.core import REGISTRY, CounterMetricFamily, GaugeMetricFamily, HistogramMetricFamily, UnknownMetricFamily
  from opencensus.common.transports import sync
  from opencensus.stats import aggregation_data
  from opencensus.stats import base_exporter
  import logging
label_desc: Use image node_id 1 to create a new PrometheusStatsExporter object from inherited base classes: base_exporter with example: obj = PrometheusStatsExporter(options, gatherer, transport, collector)