Class TagsUtil
java.lang.Object
org.axonframework.extension.metrics.micrometer.TagsUtil
Utility class for Micrometer tag management.
Contains static final fields which represent the micrometer tag KEY that should be consistent across
different metrics, and functions responsible for creating the Micrometer Tags based on the
Message that is ingested by a MessageMonitor.
- Since:
- 4.4.0
- Author:
- Ivan Dugalic, Steven van Beelen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA function for creating no MicrometerTagsat all.static final StringThe micrometerTagkey that represents the Axon Framework'sEventProcessorname. -
Method Summary
Modifier and TypeMethodDescriptionprocessorNameTag(String processorName) A function for creating a MicrometerTagbased on the givenprocessorNameonly, using thePROCESSOR_NAME_TAGkey.processorTags(String processorName) A function for creating a MicrometerTagsbased on the givenprocessorName, using thePROCESSOR_NAME_TAGkey, and theMESSAGE_TYPE_TAGGER.
-
Field Details
-
MESSAGE_TYPE_TAG
- See Also:
-
PROCESSOR_NAME_TAG
The micrometerTagkey that represents the Axon Framework'sEventProcessorname.- See Also:
-
MESSAGE_TYPE_TAGGER
-
METADATA_TAGGER
-
NO_OP
A function for creating no MicrometerTagsat all.
-
-
Method Details
-
processorNameTag
public static Function<Message,Iterable<io.micrometer.core.instrument.Tag>> processorNameTag(String processorName) A function for creating a MicrometerTagbased on the givenprocessorNameonly, using thePROCESSOR_NAME_TAGkey.- Parameters:
processorName- the name of the processor to add under thePROCESSOR_NAME_TAGkey as a tag- Returns:
- a function for creating a Micrometer
Tagbased on the givenprocessorNameonly, using thePROCESSOR_NAME_TAGkey
-
processorTags
public static Function<Message,Iterable<io.micrometer.core.instrument.Tag>> processorTags(String processorName) A function for creating a MicrometerTagsbased on the givenprocessorName, using thePROCESSOR_NAME_TAGkey, and theMESSAGE_TYPE_TAGGER.- Parameters:
processorName- the name of the processor to add under thePROCESSOR_NAME_TAGkey as a tag- Returns:
- a function for creating a Micrometer
Tagsbased on the givenprocessorName, using thePROCESSOR_NAME_TAGkey, and theMESSAGE_TYPE_TAGGER
-