Skip to content

Commit

Permalink
feat: add prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
CChuYong committed Jul 14, 2024
1 parent 72efd3b commit 183ce70
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions api-gateway/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies {
testImplementation("org.springframework.security:spring-security-test")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
implementation("io.micrometer:micrometer-tracing-bridge-otel:1.3.2")
implementation("io.micrometer:micrometer-registry-prometheus:1.13.2")
implementation("io.opentelemetry:opentelemetry-exporter-zipkin:1.40.0")


Expand Down
4 changes: 4 additions & 0 deletions api-gateway/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ springdoc:
url: https://gateway.mafoo.kr/photo/v3/api-docs

management:
endpoints:
web:
exposure:
include: health,metrics,prometheus
tracing:
sampling:
probability: 1.0
Expand Down
1 change: 1 addition & 0 deletions photo-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dependencies {
implementation("io.awspring.cloud:spring-cloud-starter-aws:2.4.4")
implementation("io.micrometer:micrometer-tracing-bridge-otel:1.3.2")
implementation("io.opentelemetry:opentelemetry-exporter-zipkin:1.40.0")
implementation("io.micrometer:micrometer-registry-prometheus:1.13.2")
}

tasks.withType<Test> {
Expand Down
4 changes: 4 additions & 0 deletions photo-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ cloud:
bucket: ${NCP_BUCKET}

management:
endpoints:
web:
exposure:
include: health,metrics,prometheus
tracing:
sampling:
probability: 1.0
Expand Down
1 change: 1 addition & 0 deletions user-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dependencies {
implementation("io.projectreactor.tools:blockhound:1.0.9.RELEASE")
implementation("io.micrometer:micrometer-tracing-bridge-otel:1.3.2")
implementation("io.opentelemetry:opentelemetry-exporter-zipkin:1.40.0")
implementation("io.micrometer:micrometer-registry-prometheus:1.13.2")
}

tasks.withType<Test>().all {
Expand Down
4 changes: 4 additions & 0 deletions user-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ app:
refresh-token: 2592000 # 30 days

management:
endpoints:
web:
exposure:
include: health,metrics,prometheus
tracing:
sampling:
probability: 1.0
Expand Down

0 comments on commit 183ce70

Please sign in to comment.