Class AnalyticsConsumerConfiguration
java.lang.Object
org.springframework.cloud.fn.consumer.analytics.AnalyticsConsumerConfiguration
@Configuration
@EnableConfigurationProperties(AnalyticsConsumerProperties.class)
public class AnalyticsConsumerConfiguration
extends Object
- Author:
- Christian Tzolov
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionanalyticsConsumer
(AnalyticsConsumerProperties properties, io.micrometer.core.instrument.MeterRegistry[] meterRegistries, EvaluationContext context) io.micrometer.core.instrument.simple.SimpleMeterRegistry
Converts the input value into an list of values.protected io.micrometer.core.instrument.Tags
Converts a key/value Map into Tag(key,value) list.
-
Field Details
-
UNAVAILABLE_TAG
Default tag value. Used to fill the tag when the actual value is missing.- See Also:
-
-
Constructor Details
-
AnalyticsConsumerConfiguration
public AnalyticsConsumerConfiguration()
-
-
Method Details
-
analyticsConsumer
@Bean(name="analyticsConsumer") public Consumer<Message<?>> analyticsConsumer(AnalyticsConsumerProperties properties, io.micrometer.core.instrument.MeterRegistry[] meterRegistries, @Lazy @Qualifier("integrationEvaluationContext") EvaluationContext context) -
toTags
Converts a key/value Map into Tag(key,value) list. Filters out the empty key/value pairs.- Parameters:
keyValueMap
- key/value map to convert into tags.- Returns:
- Returns Tags list representing every non-empty key/value pair.
-
toList
Converts the input value into an list of values. If the value is not a collection/array type the result is a single element list. For collection/array input value the result is the list of stringified content of this collection.- Parameters:
value
- input value can be array, collection or single value.- Returns:
- Returns value list.
-
simpleMeterRegistry
@Bean @ConditionalOnMissingBean public io.micrometer.core.instrument.simple.SimpleMeterRegistry simpleMeterRegistry()
-