Class OpenMetricsExporter

    • Field Detail

      • scope

        protected final String scope
      • typeWrittenByGlobalName

        protected final Set<String> typeWrittenByGlobalName
      • helpWrittenByGlobalName

        protected final Set<String> helpWrittenByGlobalName
    • Constructor Detail

      • OpenMetricsExporter

        public OpenMetricsExporter​(Writer out)
    • Method Detail

      • in

        public MetricExporter in​(String scope,
                                 boolean asNode)
        Description copied from interface: MetricExporter
        Creates a new MetricExporter with the provided scope.
        Specified by:
        in in interface MetricExporter
        Parameters:
        scope - the scope to use in the export
        Returns:
        A new instance of this MetricExporter with the provided scope set, this instance is kept unchanged and will continue to use its current scope. Both, this MetricExporter and the returned one will however share other internal state that is related to the output written so far.
      • export

        public void export​(org.eclipse.microprofile.metrics.MetricID metricID,
                           org.eclipse.microprofile.metrics.Counter counter,
                           org.eclipse.microprofile.metrics.Metadata metadata)
        Specified by:
        export in interface MetricExporter
      • export

        public void export​(org.eclipse.microprofile.metrics.MetricID metricID,
                           org.eclipse.microprofile.metrics.Gauge<?> gauge,
                           org.eclipse.microprofile.metrics.Metadata metadata)
        Specified by:
        export in interface MetricExporter
      • export

        public void export​(org.eclipse.microprofile.metrics.MetricID metricID,
                           org.eclipse.microprofile.metrics.Histogram histogram,
                           org.eclipse.microprofile.metrics.Metadata metadata)
        Specified by:
        export in interface MetricExporter
      • export

        public void export​(org.eclipse.microprofile.metrics.MetricID metricID,
                           org.eclipse.microprofile.metrics.Timer timer,
                           org.eclipse.microprofile.metrics.Metadata metadata)
        Specified by:
        export in interface MetricExporter
      • appendHELP

        protected void appendHELP​(String globalName,
                                  org.eclipse.microprofile.metrics.Metadata metadata)
      • appendValue

        protected void appendValue​(String globalName,
                                   org.eclipse.microprofile.metrics.Tag[] tags,
                                   Number value)
      • roundValue

        protected String roundValue​(Number value)
      • tagsToString

        protected static String tagsToString​(org.eclipse.microprofile.metrics.Tag[] tags)
      • sanitizeMetricName

        public static String sanitizeMetricName​(String name)