public static interface MatsInterceptable.MatsLoggingInterceptor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SUPPRESS_LOGGING_ENDPOINT_ALLOWS_ATTRIBUTE_KEY
Suppression of loglines will only be done if the affected
endpoints allows it. |
static java.lang.String |
SUPPRESS_LOGGING_TRACE_PROPERTY_KEY
If this key is present on the
TraceProperties of a Mats
Flow, with the value Boolean.TRUE , no ordinary log lines should be emitted while initiating or stage
processing the Mats Flow, assuming that the implicated endpoints
allows logging suppression. |
static final java.lang.String SUPPRESS_LOGGING_TRACE_PROPERTY_KEY
TraceProperties
of a Mats
Flow, with the value Boolean.TRUE
, no ordinary log lines should be emitted while initiating or stage
processing the Mats Flow, assuming that the implicated endpoints
allows
logging suppression. This is only to be used
for frequent system messages that otherwise would swamp the log, and should never be used for ordinary
processing.
Note wrt. suppression of initiation logging: An outgoing message starts a Mats Flow. It is the message that
holds the TraceProperty saying that logging should be suppressed. Three things: 1. Contrasted to endpoints,
initiations do not have an "allow"
concept, as it
makes no sense security wise since the initiator could just change the allowance. 2. If multiple messages are
initiated, then they all must agree of suppression for the initiation log lines to be suppressed. 3. If you
initiate, but do not send any messages after all (inside the initiation you find that there is nothing to
do), then it is impossible to suppress logging. Thus, you should instead perform whatever checking to decide
whether to send a message before going into initiation.
Note: The MatsMetricsLoggingInterceptor
has logic whereby every X minutes, the number of
suppressed logs are output (if any), grouped into matsFactory/initApp/initiatorId/stageId, so that it is
possible to assert liveliness of the system, and also get an idea of how heavy usage it leads to.
Note: Suppression of logging effectively removes these initiations and processing from any aggregate metrics
based on the log system, e.g. doing "number of message per second" in Kibana will lose out on these messages
since they aren't logged (except for the aggregate every X minutes mentioned above). Metrics in form of
MatsMicrometerInterceptor
are not affected.static final java.lang.String SUPPRESS_LOGGING_ENDPOINT_ALLOWS_ATTRIBUTE_KEY
Suppression of loglines
will only be done if the affected
endpoints allows it. Allowance is done by setting an EndpointConfig attribute
for the allowing Endpoint with this as key, with the value Boolean.TRUE
.