Package io.micrometer.prometheus
Class PrometheusMeterRegistry
java.lang.Object
io.micrometer.core.instrument.MeterRegistry
io.micrometer.prometheus.PrometheusMeterRegistry
@Deprecated
public class PrometheusMeterRegistry
extends io.micrometer.core.instrument.MeterRegistry
Deprecated.
MeterRegistry for Prometheus.-
Nested Class Summary
Nested classes/interfaces inherited from class io.micrometer.core.instrument.MeterRegistry
io.micrometer.core.instrument.MeterRegistry.Config, io.micrometer.core.instrument.MeterRegistry.More -
Field Summary
Fields inherited from class io.micrometer.core.instrument.MeterRegistry
clock -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.PrometheusMeterRegistry(PrometheusConfig config, io.prometheus.client.CollectorRegistry registry, io.micrometer.core.instrument.Clock clock) Deprecated.PrometheusMeterRegistry(PrometheusConfig config, io.prometheus.client.CollectorRegistry registry, io.micrometer.core.instrument.Clock clock, io.prometheus.client.exemplars.ExemplarSampler exemplarSampler) Deprecated.Create aPrometheusMeterRegistryinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected io.micrometer.core.instrument.distribution.DistributionStatisticConfigDeprecated.protected TimeUnitDeprecated.io.prometheus.client.CollectorRegistryDeprecated.io.micrometer.core.instrument.CounternewCounter(io.micrometer.core.instrument.Meter.Id id) Deprecated.io.micrometer.core.instrument.DistributionSummarynewDistributionSummary(io.micrometer.core.instrument.Meter.Id id, io.micrometer.core.instrument.distribution.DistributionStatisticConfig distributionStatisticConfig, double scale) Deprecated.protected <T> io.micrometer.core.instrument.FunctionCounternewFunctionCounter(io.micrometer.core.instrument.Meter.Id id, T obj, ToDoubleFunction<T> countFunction) Deprecated.protected <T> io.micrometer.core.instrument.FunctionTimernewFunctionTimer(io.micrometer.core.instrument.Meter.Id id, T obj, ToLongFunction<T> countFunction, ToDoubleFunction<T> totalTimeFunction, TimeUnit totalTimeFunctionUnit) Deprecated.protected <T> io.micrometer.core.instrument.GaugenewGauge(io.micrometer.core.instrument.Meter.Id id, T obj, ToDoubleFunction<T> valueFunction) Deprecated.protected io.micrometer.core.instrument.LongTaskTimernewLongTaskTimer(io.micrometer.core.instrument.Meter.Id id, io.micrometer.core.instrument.distribution.DistributionStatisticConfig distributionStatisticConfig) Deprecated.protected io.micrometer.core.instrument.MeternewMeter(io.micrometer.core.instrument.Meter.Id id, io.micrometer.core.instrument.Meter.Type type, Iterable<io.micrometer.core.instrument.Measurement> measurements) Deprecated.protected io.micrometer.core.instrument.TimernewTimer(io.micrometer.core.instrument.Meter.Id id, io.micrometer.core.instrument.distribution.DistributionStatisticConfig distributionStatisticConfig, io.micrometer.core.instrument.distribution.pause.PauseDetector pauseDetector) Deprecated.scrape()Deprecated.voidDeprecated.Scrape to the specified writer in Prometheus text format.voidDeprecated.Write the metrics scrape body in a specific content type to the given writer.voidDeprecated.Scrape to the specified writer.Deprecated.Get the metrics scrape body in a specific content type.Deprecated.Return text for scraping.Deprecated.For use withMeterRegistry.Config#onMeterRegistrationFailed(BiConsumer)when you want meters with the same name but different tags to cause an unchecked exception.Methods inherited from class io.micrometer.core.instrument.MeterRegistry
clear, close, config, counter, counter, find, forEachMeter, gauge, gauge, gauge, gauge, gaugeCollectionSize, gaugeMapSize, get, getConventionName, getConventionTags, getMeters, isClosed, meterRegistrationFailed, more, newLongTaskTimer, newTimeGauge, remove, remove, removeByPreFilterId, summary, summary, timer, timer
-
Constructor Details
-
PrometheusMeterRegistry
Deprecated. -
PrometheusMeterRegistry
public PrometheusMeterRegistry(PrometheusConfig config, io.prometheus.client.CollectorRegistry registry, io.micrometer.core.instrument.Clock clock) Deprecated. -
PrometheusMeterRegistry
public PrometheusMeterRegistry(PrometheusConfig config, io.prometheus.client.CollectorRegistry registry, io.micrometer.core.instrument.Clock clock, @Nullable io.prometheus.client.exemplars.ExemplarSampler exemplarSampler) Deprecated.Create aPrometheusMeterRegistryinstance.- Parameters:
config- configurationregistry- collector registryclock- clockexemplarSampler- exemplar sampler- Since:
- 1.9.0
-
-
Method Details
-
scrape
Deprecated.- Returns:
- Content in Prometheus text format for the response body of an endpoint designated for Prometheus to scrape.
-
scrape
Deprecated.Get the metrics scrape body in a specific content type.- Parameters:
contentType- the scrape Content-Type- Returns:
- the scrape body
- Since:
- 1.7.0
- See Also:
-
scrape
Deprecated.Scrape to the specified writer in Prometheus text format.- Parameters:
writer- Target that serves the content to be scraped by Prometheus.- Throws:
IOException- if writing fails- Since:
- 1.2.0
-
scrape
Deprecated.Write the metrics scrape body in a specific content type to the given writer.- Parameters:
writer- where to write the scrape bodycontentType- the Content-Type of the scrape- Throws:
IOException- if writing fails- Since:
- 1.7.0
- See Also:
-
scrape
Deprecated.Return text for scraping.- Parameters:
contentType- the Content-Type of the scrape.includedNames- Sample names to be included. All samples will be included ifnull.- Returns:
- Content that should be included in the response body for an endpoint designated for Prometheus to scrape from.
- Since:
- 1.7.0
-
scrape
public void scrape(Writer writer, String contentType, @Nullable Set<String> includedNames) throws IOException Deprecated.Scrape to the specified writer.- Parameters:
writer- Target that serves the content to be scraped by Prometheus.contentType- the Content-Type of the scrape.includedNames- Sample names to be included. All samples will be included ifnull.- Throws:
IOException- if writing fails- Since:
- 1.7.0
-
newCounter
public io.micrometer.core.instrument.Counter newCounter(io.micrometer.core.instrument.Meter.Id id) Deprecated.- Specified by:
newCounterin classio.micrometer.core.instrument.MeterRegistry
-
newDistributionSummary
public io.micrometer.core.instrument.DistributionSummary newDistributionSummary(io.micrometer.core.instrument.Meter.Id id, io.micrometer.core.instrument.distribution.DistributionStatisticConfig distributionStatisticConfig, double scale) Deprecated.- Specified by:
newDistributionSummaryin classio.micrometer.core.instrument.MeterRegistry
-
newTimer
protected io.micrometer.core.instrument.Timer newTimer(io.micrometer.core.instrument.Meter.Id id, io.micrometer.core.instrument.distribution.DistributionStatisticConfig distributionStatisticConfig, io.micrometer.core.instrument.distribution.pause.PauseDetector pauseDetector) Deprecated.- Specified by:
newTimerin classio.micrometer.core.instrument.MeterRegistry
-
newGauge
protected <T> io.micrometer.core.instrument.Gauge newGauge(io.micrometer.core.instrument.Meter.Id id, @Nullable T obj, ToDoubleFunction<T> valueFunction) Deprecated.- Specified by:
newGaugein classio.micrometer.core.instrument.MeterRegistry
-
newLongTaskTimer
protected io.micrometer.core.instrument.LongTaskTimer newLongTaskTimer(io.micrometer.core.instrument.Meter.Id id, io.micrometer.core.instrument.distribution.DistributionStatisticConfig distributionStatisticConfig) Deprecated.- Overrides:
newLongTaskTimerin classio.micrometer.core.instrument.MeterRegistry
-
newFunctionTimer
protected <T> io.micrometer.core.instrument.FunctionTimer newFunctionTimer(io.micrometer.core.instrument.Meter.Id id, T obj, ToLongFunction<T> countFunction, ToDoubleFunction<T> totalTimeFunction, TimeUnit totalTimeFunctionUnit) Deprecated.- Specified by:
newFunctionTimerin classio.micrometer.core.instrument.MeterRegistry
-
newFunctionCounter
protected <T> io.micrometer.core.instrument.FunctionCounter newFunctionCounter(io.micrometer.core.instrument.Meter.Id id, T obj, ToDoubleFunction<T> countFunction) Deprecated.- Specified by:
newFunctionCounterin classio.micrometer.core.instrument.MeterRegistry
-
newMeter
protected io.micrometer.core.instrument.Meter newMeter(io.micrometer.core.instrument.Meter.Id id, io.micrometer.core.instrument.Meter.Type type, Iterable<io.micrometer.core.instrument.Measurement> measurements) Deprecated.- Specified by:
newMeterin classio.micrometer.core.instrument.MeterRegistry
-
getBaseTimeUnit
Deprecated.- Specified by:
getBaseTimeUnitin classio.micrometer.core.instrument.MeterRegistry
-
getPrometheusRegistry
public io.prometheus.client.CollectorRegistry getPrometheusRegistry()Deprecated.- Returns:
- The underlying Prometheus
CollectorRegistry.
-
defaultHistogramConfig
protected io.micrometer.core.instrument.distribution.DistributionStatisticConfig defaultHistogramConfig()Deprecated.- Specified by:
defaultHistogramConfigin classio.micrometer.core.instrument.MeterRegistry
-
throwExceptionOnRegistrationFailure
Deprecated.For use withMeterRegistry.Config#onMeterRegistrationFailed(BiConsumer)when you want meters with the same name but different tags to cause an unchecked exception.- Returns:
- This registry
- Since:
- 1.6.0
-
io.micrometer.prometheusmetrics.PrometheusMeterRegistry.