Skip to content

Commit

Permalink
Provide Prometheus metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkopp committed Feb 6, 2024
1 parent 9b70214 commit b06087d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<flapdoodle-mongodb.version>4.11.0</flapdoodle-mongodb.version>
<springdoc-openapi.version>2.3.0</springdoc-openapi.version>
<resilience4j.version>2.2.0</resilience4j.version>
<micrometer.version>1.12.1</micrometer.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -103,6 +104,11 @@
<artifactId>spring-boot-starter-actuator</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<version>${micrometer.version}</version>
</dependency>

<!-- Test dependencies -->

Expand Down
16 changes: 16 additions & 0 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ spring:
password: ${SPRING_DATASOURCE_PASSWORD}
driver-class-name: ${SPRING_DATASOURCE_DRIVER_CLASS_NAME:org.postgresql.Driver}

management:
endpoints:
web:
exposure:
include: prometheus, health
health:
livenessState:
enabled: true
readinessState:
enabled: true
endpoint:
health:
probes:
enabled: true
show-details: always

t2:
cart:
TTL: ${T2_CART_TTL:0}
Expand Down

0 comments on commit b06087d

Please sign in to comment.