Skip to content
Permalink
Browse files

add instrumentation with prometheus & produce metrics for order count…

… and payment expected order count
  • Loading branch information...
mucahitkurt committed Aug 27, 2018
1 parent ec35089 commit 6da73a7fbfed5078578fca261a31b2b8f9274098
10 pom.xml
@@ -89,6 +89,16 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<artifactId>json-path</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>

</dependencies>

<build>
@@ -22,6 +22,7 @@
import javax.money.MonetaryAmount;
import javax.money.format.MonetaryFormats;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.javamoney.moneta.Money;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -79,13 +80,13 @@ public RestbucksModule() {
static abstract class OrderMixin {

@JsonCreator
public OrderMixin(Collection<LineItem> lineItems, Location location) {}
public OrderMixin(@JsonProperty("lineItems") Collection<LineItem> lineItems, @JsonProperty("location") Location location) {}
}

static abstract class LineItemMixin {

@JsonCreator
public LineItemMixin(String name, int quantity, Milk milk, Size size, MonetaryAmount price) {}
public LineItemMixin(@JsonProperty("name") String name, @JsonProperty("quantity") int quantity, @JsonProperty("milk") Milk milk, @JsonProperty("size") Size size, @JsonProperty("price") MonetaryAmount price) {}
}

@JsonAutoDetect(isGetterVisibility = JsonAutoDetect.Visibility.NONE)

0 comments on commit 6da73a7

Please sign in to comment.
You can’t perform that action at this time.