public class MatsMicrometerInterceptor
extends java.lang.Object
implements io.mats3.api.intercept.MatsMetricsInterceptor, io.mats3.api.intercept.MatsInitiateInterceptor, io.mats3.api.intercept.MatsStageInterceptor
MeterRegistry, it will employ this to create the metrics on, otherwise it employs the
Metrics.globalRegistry.
Note: This interceptor (Micrometer Metrics) has special support in JmsMatsFactory: If present on the
classpath, it is automatically installed using the install(MatsInterceptableMatsFactory) install method.
This implies that it employs the Micrometer 'globalRegistry'. If you rather want to
supply a specific registry, then install a different instance using the
install(MatsInterceptableMatsFactory, MeterRegistry) method - the JmsMatsFactory will then
remove the automatically installed, since it implements the special marker-interface MatsMetricsInterceptor
of which there can only be one instance installed.
Notice the class MatsMicrometerInterceptor.SuggestedTimingHistogramsMeterFilter. You may apply this as such:Metrics.globalRegistry.config().meterFilter(new SuggestedTimingHistogramsMeterFilter());MeterFilter logic of
Micrometer.| Modifier and Type | Class and Description |
|---|---|
static class |
MatsMicrometerInterceptor.SuggestedTimingHistogramsMeterFilter
A
MeterFilter that applies a hopefully reasonable histogram to all timing meters. |
io.mats3.api.intercept.MatsInitiateInterceptor.InitiateCompletedContext, io.mats3.api.intercept.MatsInitiateInterceptor.InitiateInterceptContext, io.mats3.api.intercept.MatsInitiateInterceptor.InitiateInterceptOutgoingMessagesContext, io.mats3.api.intercept.MatsInitiateInterceptor.InitiateInterceptUserLambdaContext, io.mats3.api.intercept.MatsInitiateInterceptor.InitiateStartedContext, io.mats3.api.intercept.MatsInitiateInterceptor.MatsInitiateInterceptOutgoingMessages, io.mats3.api.intercept.MatsInitiateInterceptor.MatsInitiateInterceptUserLambdaio.mats3.api.intercept.MatsStageInterceptor.MatsStageInterceptOutgoingMessages, io.mats3.api.intercept.MatsStageInterceptor.MatsStageInterceptUserLambda, io.mats3.api.intercept.MatsStageInterceptor.StageCommonContext, io.mats3.api.intercept.MatsStageInterceptor.StageCompletedContext, io.mats3.api.intercept.MatsStageInterceptor.StageInterceptContext, io.mats3.api.intercept.MatsStageInterceptor.StageInterceptOutgoingMessageContext, io.mats3.api.intercept.MatsStageInterceptor.StageInterceptUserLambdaContext, io.mats3.api.intercept.MatsStageInterceptor.StagePreprocessAndDeserializeErrorContext, io.mats3.api.intercept.MatsStageInterceptor.StageReceivedContext| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COUNT_EXEC_MSGS_OUT_DESC |
static java.lang.String |
COUNT_EXEC_MSGS_OUT_NAME |
static java.lang.String |
LOG_PREFIX |
static int |
MAX_NUMBER_OF_METRICS
This is a cardinality-explosion-avoidance limit in case of wrongly used initiatorIds.
|
static java.lang.String |
METRIC_EXEC_OPS_MEASURE_PREFIX |
static java.lang.String |
METRIC_EXEC_OPS_TIMING_PREFIX |
static java.lang.String |
SIZE_MSG_ENVELOPE_DESC |
static java.lang.String |
SIZE_MSG_ENVELOPE_NAME |
static java.lang.String |
SIZE_MSG_WIRE_DESC |
static java.lang.String |
SIZE_MSG_WIRE_NAME |
static java.lang.String |
TIMER_EXEC_DB_COMMIT_DESC |
static java.lang.String |
TIMER_EXEC_DB_COMMIT_NAME |
static java.lang.String |
TIMER_EXEC_MSGS_OUT_DESC |
static java.lang.String |
TIMER_EXEC_MSGS_OUT_NAME |
static java.lang.String |
TIMER_EXEC_MSGSYS_COMMIT_DESC |
static java.lang.String |
TIMER_EXEC_MSGSYS_COMMIT_NAME |
static java.lang.String |
TIMER_EXEC_TOTAL_DESC |
static java.lang.String |
TIMER_EXEC_TOTAL_NAME |
static java.lang.String |
TIMER_EXEC_USER_LAMBDA_DESC |
static java.lang.String |
TIMER_EXEC_USER_LAMBDA_NAME |
static java.lang.String |
TIMER_MSG_MSGSYS_SEND_DESC |
static java.lang.String |
TIMER_MSG_MSGSYS_SEND_NAME |
static java.lang.String |
TIMER_MSG_TOTAL_DESC |
static java.lang.String |
TIMER_MSG_TOTAL_NAME |
| Modifier and Type | Method and Description |
|---|---|
void |
initiateCompleted(io.mats3.api.intercept.MatsInitiateInterceptor.InitiateCompletedContext ctx) |
static MatsMicrometerInterceptor |
install(io.mats3.api.intercept.MatsInterceptableMatsFactory matsInterceptableMatsFactory)
Installs a singleton instance of
MatsMicrometerInterceptor which employs the
Metrics.globalRegistry, on the provided MatsInterceptableMatsFactory. |
static MatsMicrometerInterceptor |
install(io.mats3.api.intercept.MatsInterceptableMatsFactory matsInterceptableMatsFactory,
io.micrometer.core.instrument.MeterRegistry meterRegistry)
Creates a
MatsMicrometerInterceptor employing the provided MeterRegistry, and installs it as a
singleton on the provided MatsInterceptableMatsFactory |
void |
stageCompleted(io.mats3.api.intercept.MatsStageInterceptor.StageCompletedContext ctx) |
void |
stageReceived(io.mats3.api.intercept.MatsStageInterceptor.StageReceivedContext ctx) |
public static final java.lang.String LOG_PREFIX
public static final java.lang.String TIMER_EXEC_TOTAL_NAME
public static final java.lang.String TIMER_EXEC_TOTAL_DESC
public static final java.lang.String TIMER_EXEC_USER_LAMBDA_NAME
public static final java.lang.String TIMER_EXEC_USER_LAMBDA_DESC
public static final java.lang.String TIMER_EXEC_MSGS_OUT_NAME
public static final java.lang.String TIMER_EXEC_MSGS_OUT_DESC
public static final java.lang.String COUNT_EXEC_MSGS_OUT_NAME
public static final java.lang.String COUNT_EXEC_MSGS_OUT_DESC
public static final java.lang.String TIMER_EXEC_DB_COMMIT_NAME
public static final java.lang.String TIMER_EXEC_DB_COMMIT_DESC
public static final java.lang.String TIMER_EXEC_MSGSYS_COMMIT_NAME
public static final java.lang.String TIMER_EXEC_MSGSYS_COMMIT_DESC
public static final java.lang.String METRIC_EXEC_OPS_TIMING_PREFIX
public static final java.lang.String METRIC_EXEC_OPS_MEASURE_PREFIX
public static final java.lang.String TIMER_MSG_TOTAL_NAME
public static final java.lang.String TIMER_MSG_TOTAL_DESC
public static final java.lang.String TIMER_MSG_MSGSYS_SEND_NAME
public static final java.lang.String TIMER_MSG_MSGSYS_SEND_DESC
public static final java.lang.String SIZE_MSG_ENVELOPE_NAME
public static final java.lang.String SIZE_MSG_ENVELOPE_DESC
public static final java.lang.String SIZE_MSG_WIRE_NAME
public static final java.lang.String SIZE_MSG_WIRE_DESC
public static final int MAX_NUMBER_OF_METRICS
public static MatsMicrometerInterceptor install(io.mats3.api.intercept.MatsInterceptableMatsFactory matsInterceptableMatsFactory, io.micrometer.core.instrument.MeterRegistry meterRegistry)
MatsMicrometerInterceptor employing the provided MeterRegistry, and installs it as a
singleton on the provided MatsInterceptableMatsFactorymatsInterceptableMatsFactory - the MatsInterceptable to install on (probably a MatsFactory.meterRegistry - the Micrometer MeterRegistry to create meters on.MatsMicrometerInterceptor instance which was installed as singleton.public static MatsMicrometerInterceptor install(io.mats3.api.intercept.MatsInterceptableMatsFactory matsInterceptableMatsFactory)
MatsMicrometerInterceptor which employs the
Metrics.globalRegistry, on the provided MatsInterceptableMatsFactory.matsInterceptableMatsFactory - the MatsInterceptable to install on (probably a MatsFactory.MatsMicrometerInterceptor instance which was installed as singleton.public void initiateCompleted(io.mats3.api.intercept.MatsInitiateInterceptor.InitiateCompletedContext ctx)
initiateCompleted in interface io.mats3.api.intercept.MatsInitiateInterceptorpublic void stageReceived(io.mats3.api.intercept.MatsStageInterceptor.StageReceivedContext ctx)
stageReceived in interface io.mats3.api.intercept.MatsStageInterceptorpublic void stageCompleted(io.mats3.api.intercept.MatsStageInterceptor.StageCompletedContext ctx)
stageCompleted in interface io.mats3.api.intercept.MatsStageInterceptor