Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #31 from microservices-demo/monitoring/annotation-…
Browse files Browse the repository at this point in the history
…driven

Use annotation to create metrics endpoint.
  • Loading branch information
Phil Winder authored Mar 17, 2017
2 parents d0a55c9 + 3fec6c6 commit 4a0d078
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 36 deletions.
3 changes: 2 additions & 1 deletion src/main/java/works/weave/socks/cart/CartApplication.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package works.weave.socks.cart;

import io.prometheus.client.spring.boot.EnablePrometheusEndpoint;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@EnablePrometheusEndpoint
public class CartApplication {

public static void main(String[] args) {
SpringApplication.run(CartApplication.class, args);
}
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ spring.sleuth.sampler.percentage=1.0
spring.application.name=carts
# Disable actuator metrics endpoints
endpoints.metrics.enabled=false
endpoints.prometheus.id=metrics

0 comments on commit 4a0d078

Please sign in to comment.