Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

그라파나, 프로메테우스 설정 및 관련 의존성 추가 #31 #32

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ dependencies {
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'

// Monitoring
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.requestMatchers(
"/login", "/signup", "/", "/user",
"/api/auth/**",
"/swagger-ui/**"
"/swagger-ui/**",
"/actuator/**"
).permitAll()
.anyRequest().authenticated()
);
Expand Down
12 changes: 11 additions & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ logging.level:
org.hibernate:
orm.jdbc.bind: trace
SQL: debug

jwt:
secret: 4099a46b-39db-4860-a61b-2ae76ea24c43
access-token-expire-time: 1800000 # 30 minutes
refresh-token-expire-time: 2592000000 # 30 days
refresh-token-expire-time: 2592000000 # 30 days

management:
endpoints:
web:
exposure: # 외부에 노출할 엔드포인트
include: prometheus, health, info, swagger-ui
metrics:
tags:
application: "katecam" # 메트릭 데이터에 태그를 추가