Counter’s implementation is based on the Micrometer library which is a Vendor-neutral application metrics facade that supports the most popular monitoring systems. See the Micrometer documentation for the list of supported monitoring systems. Starting with Spring Boot 2.0, Micrometer is the instrumentation library powering the delivery of application metrics from Spring Boot.
All Spring Cloud Stream App Starters are configured to support two of the most popular monitoring systems, Prometheus and InfluxDB. You can declaratively select which monitoring system to use. If you are not using Prometheus or InfluxDB, you can customise the App starters to use a different monitoring system as well as include your preferred micrometer monitoring system library in your own custom applications.
Grafana is a popular platform for building visualization dashboards.
To enable Micrometer’s Prometheus meter registry for Spring Cloud Stream application starters, set the following properties.
management.metrics.export.prometheus.enabled=true
management.endpoints.web.exposure.include=prometheus
and disable the application’s security which allows for a simple Prometheus configuration to scrape counter information by setting the following property.
spring.cloud.streamapp.security.enabled=false
To enable Micrometer’s Influx meter registry for Spring Cloud Stream application starters, set the following property.
management.metrics.export.influx.enabled=true
management.metrics.export.influx.uri={influxdb-server-url}
Note
|
if the Data Flow Server metrics is enabled then the Counter will reuse the exiting configurations.
|
Following diagram illustrates Counter’s information collection and processing flow.
Description: Counter that compute multiple counters from the received messages.
Description: Pass-Through Processor that computes multiple Counters from the messages that pass through.