@Singleton class InjectedMetricProducer extends Object
Meter, Timer, Counter,
and Histogram.
Due to build-time processing, {literal @}Metric annotations always have
a name value that has been resolved according to MP Metrics naming conventions.| Modifier and Type | Field and Description |
|---|---|
(package private) MetricRegistryAdapter |
mpRegistry |
| Constructor and Description |
|---|
InjectedMetricProducer(MetricRegistryAdapter mpRegistry) |
| Modifier and Type | Method and Description |
|---|---|
(package private) org.eclipse.microprofile.metrics.ConcurrentGauge |
getConcurrentGauge(javax.enterprise.inject.spi.InjectionPoint ip)
For a programmatic concurrent gauge, create a gauge around
a simple implementation that uses a
LongAdder. |
(package private) org.eclipse.microprofile.metrics.Counter |
getCounter(javax.enterprise.inject.spi.InjectionPoint ip) |
(package private) org.eclipse.microprofile.metrics.Histogram |
getHistogram(javax.enterprise.inject.spi.InjectionPoint ip) |
(package private) org.eclipse.microprofile.metrics.Meter |
getMeter(javax.enterprise.inject.spi.InjectionPoint ip) |
(package private) org.eclipse.microprofile.metrics.SimpleTimer |
getSimpleTimer(javax.enterprise.inject.spi.InjectionPoint ip) |
(package private) org.eclipse.microprofile.metrics.Timer |
getTimer(javax.enterprise.inject.spi.InjectionPoint ip) |
final MetricRegistryAdapter mpRegistry
InjectedMetricProducer(MetricRegistryAdapter mpRegistry)
@Produces org.eclipse.microprofile.metrics.Counter getCounter(javax.enterprise.inject.spi.InjectionPoint ip)
@Produces org.eclipse.microprofile.metrics.ConcurrentGauge getConcurrentGauge(javax.enterprise.inject.spi.InjectionPoint ip)
LongAdder.
The metrics gathered this way will not be as rich as with the
LongTimerTask-based metrics used with the
{literal @}ConcurrentGauge annotation, but is the best the API
semantics allow (decrement/increment).@Produces org.eclipse.microprofile.metrics.Histogram getHistogram(javax.enterprise.inject.spi.InjectionPoint ip)
@Produces org.eclipse.microprofile.metrics.Meter getMeter(javax.enterprise.inject.spi.InjectionPoint ip)
@Produces org.eclipse.microprofile.metrics.SimpleTimer getSimpleTimer(javax.enterprise.inject.spi.InjectionPoint ip)
@Produces org.eclipse.microprofile.metrics.Timer getTimer(javax.enterprise.inject.spi.InjectionPoint ip)
Copyright © 2021 JBoss by Red Hat. All rights reserved.