Skip to content

Commit

Permalink
모니터링 툴 연동
Browse files Browse the repository at this point in the history
  • Loading branch information
fr35wo committed Aug 6, 2024
1 parent 8a81168 commit bfb0d85
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'java'
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'
id "com.gorylenko.gradle-git-properties" version "2.4.1" //git info
}

group = 'com.example'
Expand Down Expand Up @@ -65,6 +66,12 @@ dependencies {

// Redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis'

// actuator
implementation 'org.springframework.boot:spring-boot-starter-actuator'

// prometheus
implementation 'io.micrometer:micrometer-registry-prometheus'
}

jar {
Expand All @@ -83,3 +90,8 @@ clean {
tasks.withType(JavaCompile) {
options.generatedSourceOutputDirectory = file(querydslSrcDir)
}

// actuator
springBoot {
buildInfo()
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.http.HttpStatus;
import org.springframework.scheduling.annotation.Async;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ private void permitAllForOAuthEndpoints(HttpSecurity http) throws Exception {
"/api/github/token",
"/api/apple/token",
"/api/token/access",
"/local-act-dashboard/prometheus",
};

for (String url : permittedUrls) {
Expand Down
21 changes: 21 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,26 @@ cloudfront-domain-name: ${cloudfront-domain-name}

FIREBASE_KEY: ${FIREBASE_KEY}

management:
server:
port: ${management.server.port}
endpoints:
web:
exposure:
include: "*"
base-path: ${management.endpoints.web.base-path}
endpoint:
health:
show-details: always
info:
java:
enabled: true
os:
enabled: true
git:
mode: "full"


---

spring:
Expand Down Expand Up @@ -136,3 +156,4 @@ logging:
myapp:
api-url: ${myapp.api-url}
local-url: ${myapp.local-url}

0 comments on commit bfb0d85

Please sign in to comment.