Class MicroProfileMetricsEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.component.microprofile.metrics.MicroProfileMetricsEndpoint
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="3.0.0", scheme="microprofile-metrics", title="MicroProfile Metrics", syntax="microprofile-metrics:metricType:metricName", producerOnly=true, category=MONITORING, headersClass=MicroProfileMetricsConstants.class) public class MicroProfileMetricsEndpoint extends org.apache.camel.support.DefaultEndpoint
Expose metrics from Camel routes.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.microprofile.metrics.MetricRegistry
metricRegistry
-
Constructor Summary
Constructors Constructor Description MicroProfileMetricsEndpoint(String uri, org.apache.camel.Component component, org.eclipse.microprofile.metrics.MetricRegistry metricRegistry, org.eclipse.microprofile.metrics.MetricType metricType, String metricsName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.Consumer
createConsumer(org.apache.camel.Processor processor)
org.apache.camel.Producer
createProducer()
String
getAction()
Long
getCounterIncrement()
String
getDescription()
String
getDisplayName()
Sets a display name within the metric metadataBoolean
getGaugeDecrement()
Boolean
getGaugeIncrement()
Number
getGaugeValue()
Long
getMark()
String
getMetricName()
org.eclipse.microprofile.metrics.MetricRegistry
getMetricRegistry()
org.eclipse.microprofile.metrics.MetricType
getMetricType()
String
getMetricUnit()
String
getTags()
Long
getValue()
void
setAction(String action)
The action to use when using the Timer metric typevoid
setCounterIncrement(Long counterIncrement)
The amount to increment to use when using the Counter metric typevoid
setDescription(String description)
Sets a description within the metric metadatavoid
setDisplayName(String displayName)
void
setGaugeDecrement(Boolean gaugeDecrement)
Decrements a gauge value when using the ConcurrentGauge metric typevoid
setGaugeIncrement(Boolean gaugeIncrement)
Increments a gauge value when using the ConcurrentGauge metric typevoid
setGaugeValue(Number gaugeValue)
Sets the gauge value when using the Gauge metric typevoid
setMark(Long mark)
The mark value to set when using the Meter metric typevoid
setMetricUnit(String metricUnit)
Sets a metric unit within the metric metadatavoid
setTags(String tags)
void
setValue(Long value)
The value to set when using the Histogram metric type-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
- Throws:
Exception
-
getMetricRegistry
public org.eclipse.microprofile.metrics.MetricRegistry getMetricRegistry()
-
getMetricType
public org.eclipse.microprofile.metrics.MetricType getMetricType()
-
getMetricName
public String getMetricName()
-
getTags
public String getTags()
-
setTags
public void setTags(String tags)
-
getAction
public String getAction()
-
setAction
public void setAction(String action)
The action to use when using the Timer metric type
-
getMark
public Long getMark()
-
setMark
public void setMark(Long mark)
The mark value to set when using the Meter metric type
-
getValue
public Long getValue()
-
setValue
public void setValue(Long value)
The value to set when using the Histogram metric type
-
getCounterIncrement
public Long getCounterIncrement()
-
setCounterIncrement
public void setCounterIncrement(Long counterIncrement)
The amount to increment to use when using the Counter metric type
-
getGaugeIncrement
public Boolean getGaugeIncrement()
-
setGaugeIncrement
public void setGaugeIncrement(Boolean gaugeIncrement)
Increments a gauge value when using the ConcurrentGauge metric type
-
getGaugeDecrement
public Boolean getGaugeDecrement()
-
setGaugeDecrement
public void setGaugeDecrement(Boolean gaugeDecrement)
Decrements a gauge value when using the ConcurrentGauge metric type
-
getGaugeValue
public Number getGaugeValue()
-
setGaugeValue
public void setGaugeValue(Number gaugeValue)
Sets the gauge value when using the Gauge metric type
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
Sets a description within the metric metadata
-
getDisplayName
public String getDisplayName()
Sets a display name within the metric metadata
-
setDisplayName
public void setDisplayName(String displayName)
-
getMetricUnit
public String getMetricUnit()
-
setMetricUnit
public void setMetricUnit(String metricUnit)
Sets a metric unit within the metric metadata
-
-