Skip to content

Commit e87127a

Browse files
authored
feat : add prometheus && grafana (#104)
1 parent 61d0e6e commit e87127a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ dependencies {
7373
// Mac에서 빌드시 필요한 의존성
7474
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.121.Final:osx-aarch_64'
7575

76-
// actuator
76+
// actuator + 프로메테우스
7777
implementation 'org.springframework.boot:spring-boot-starter-actuator'
78+
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
7879

7980
// elasticsearch + elasticsearch 쿼리빌더 dsl
8081
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'

src/main/resources/application.properties

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ spring.message.activemq.password=${ACTIVEMQ_PASSWORD}
4646
spring.message.activemq.port=${ACTIVEMQ_PORT}
4747

4848
# ========================
49-
# Actuator
49+
# Actuator && Prometheus
5050
# ========================
51-
management.endpoints.web.exposure.include=health,info
51+
management.endpoints.web.exposure.include=health,metrics,prometheus,info
5252
management.endpoint.health.show-details=always
53+
management.endpoint.health.access=unrestricted
54+
management.endpoint.metrics.access=unrestricted
55+
management.endpoint.prometheus.access=unrestricted
56+
management.prometheus.metrics.export.enabled=true
5357

5458
# ========================
5559
# Judge0Client
@@ -122,7 +126,6 @@ cloud.aws.s3.bucket=ezcode-s3
122126
cloud.aws.region.static=ap-northeast-2
123127
cloud.aws.stack.auto=false
124128

125-
126129
#logging.level.org.springframework.security=DEBUG
127130
#logging.level.org.springframework.security.oauth2=DEBUG
128131
#logging.level.org.springframework.security.oauth2.client=TRACE

0 commit comments

Comments
 (0)