RageZBla / spring-micrometer-prometheus-custom-metrics

Quick demo application to show integration between Micrometer and prometheus and metric-registrar.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo application how to get custom metrics in doppler/prometheus

Running the app locally

cd ticket-metrics
./gradlew bootRun

Push the app to Cloud Foundry

cd ticket-metrics
./gradlew build
cf push

Register the prometheus endpoint to Metric registrar

In order to get the metrics into the loggregator system, using VMWare Tanzu Metric Registrar

$ cf register-metrics-endpoint ticket-metrics /actuator/prometheus
$ cf tail -f --envelope-type=counter ticket-metrics | grep pcf_ticket

Endpoints

  • POST /increase/closed - increments the pcf_ticket_closed_total counter
  • POST /increase/opened - increments the pcf_ticket_opened_total counter
  • /actuator/prometheus - Prometheus endpoint for metrics

About

Quick demo application to show integration between Micrometer and prometheus and metric-registrar.


Languages

Language:HTML 53.1%Language:Java 46.9%