From 994cbdef9f25a5f257fcb061f61f476b9884b84d Mon Sep 17 00:00:00 2001 From: Sabby Anandan Date: Fri, 14 Aug 2020 11:18:37 -0700 Subject: [PATCH] Add micrometer dependencies --- brake-logs/pom.xml | 14 ++++ .../brakelogs/BrakeLogsApplication.java | 4 +- .../java/com/springone/brakelogs/Truck.java | 75 ------------------- brake-temperature/pom.xml | 14 ++++ trucks/pom.xml | 14 ++++ 5 files changed, 44 insertions(+), 77 deletions(-) delete mode 100644 brake-logs/src/main/java/com/springone/brakelogs/Truck.java diff --git a/brake-logs/pom.xml b/brake-logs/pom.xml index 52fd568..2e4ae84 100644 --- a/brake-logs/pom.xml +++ b/brake-logs/pom.xml @@ -38,6 +38,20 @@ org.springframework.boot spring-boot-starter-actuator + + org.springframework.cloud.stream.app + app-starters-micrometer-common + 2.1.2.RELEASE + + + io.micrometer + micrometer-registry-prometheus + + + io.micrometer.prometheus + prometheus-rsocket-spring + 0.9.0 + org.springframework.boot diff --git a/brake-logs/src/main/java/com/springone/brakelogs/BrakeLogsApplication.java b/brake-logs/src/main/java/com/springone/brakelogs/BrakeLogsApplication.java index dde9c37..dc302fd 100644 --- a/brake-logs/src/main/java/com/springone/brakelogs/BrakeLogsApplication.java +++ b/brake-logs/src/main/java/com/springone/brakelogs/BrakeLogsApplication.java @@ -14,8 +14,8 @@ public static void main(String[] args) { } @Bean - public Consumer process() { - return truck -> System.out.println(truck); + public Consumer process() { + return result -> System.out.println(result); } } diff --git a/brake-logs/src/main/java/com/springone/brakelogs/Truck.java b/brake-logs/src/main/java/com/springone/brakelogs/Truck.java deleted file mode 100644 index 3df90b8..0000000 --- a/brake-logs/src/main/java/com/springone/brakelogs/Truck.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.springone.brakelogs; - -public class Truck { - - String id; - - Float acceleration; - - Float velocity; - - Float brakeTemperature; - - Float internalTemperature; - - Float externalTemperature; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public Float getAcceleration() { - return acceleration; - } - - public void setAcceleration(Float acceleration) { - this.acceleration = acceleration; - } - - public Float getVelocity() { - return velocity; - } - - public void setVelocity(Float velocity) { - this.velocity = velocity; - } - - public Float getBrakeTemperature() { - return brakeTemperature; - } - - public void setBrakeTemperature(Float brakeTemperature) { - this.brakeTemperature = brakeTemperature; - } - - public Float getInternalTemperature() { - return internalTemperature; - } - - public void setInternalTemperature(Float internalTemperature) { - this.internalTemperature = internalTemperature; - } - - public Float getExternalTemperature() { - return externalTemperature; - } - - public void setExternalTemperature(Float externalTemperature) { - this.externalTemperature = externalTemperature; - } - - @Override public String toString() { - return "Truck{" + - "id='" + id + '\'' + - ", acceleration=" + acceleration + - ", velocity=" + velocity + - ", brakeTemperature=" + brakeTemperature + - ", internalTemperature=" + internalTemperature + - ", externalTemperature=" + externalTemperature + - '}'; - } -} diff --git a/brake-temperature/pom.xml b/brake-temperature/pom.xml index b8fd0df..a68183b 100644 --- a/brake-temperature/pom.xml +++ b/brake-temperature/pom.xml @@ -38,6 +38,20 @@ org.springframework.boot spring-boot-starter-actuator + + org.springframework.cloud.stream.app + app-starters-micrometer-common + 2.1.2.RELEASE + + + io.micrometer + micrometer-registry-prometheus + + + io.micrometer.prometheus + prometheus-rsocket-spring + 0.9.0 + org.springframework.boot diff --git a/trucks/pom.xml b/trucks/pom.xml index 71fb560..08b4e82 100644 --- a/trucks/pom.xml +++ b/trucks/pom.xml @@ -42,6 +42,20 @@ org.springframework.boot spring-boot-starter-actuator + + org.springframework.cloud.stream.app + app-starters-micrometer-common + 2.1.2.RELEASE + + + io.micrometer + micrometer-registry-prometheus + + + io.micrometer.prometheus + prometheus-rsocket-spring + 0.9.0 + org.springframework.boot