diff --git a/build.gradle b/build.gradle index 623b8ad..d74d5ee 100644 --- a/build.gradle +++ b/build.gradle @@ -32,6 +32,8 @@ dependencies { implementation 'me.paulschwarz:spring-dotenv:4.0.0' implementation 'org.springframework.security:spring-security-crypto' implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'io.micrometer:micrometer-tracing-bridge-brave' + implementation 'io.zipkin.reporter2:zipkin-reporter-brave' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'com.mysql:mysql-connector-j' diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 9b30ee1..b75f732 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -13,6 +13,7 @@ spring: hibernate: format_sql: true dialect: org.hibernate.dialect.MySQL8Dialect + config: activate: on-profile: dev @@ -21,12 +22,17 @@ server: port: 9000 logging: - level: - org.springframework.security: DEBUG - org.hibernate.SQL: DEBUG - org.hibernate.type.descriptor.sql.BasicBinder: TRACE + config: classpath:logback-dev.xml auth: jwt: private-key-path: ${JWT_PRIVATE_KEY_PATH} - public-key-path: ${JWT_PUBLIC_KEY_PATH} \ No newline at end of file + public-key-path: ${JWT_PUBLIC_KEY_PATH} + +management: + tracing: + sampling: + probability: 1.0 + zipkin: + tracing: + endpoint: ${ZIPKIN_URL}/api/v2/spans \ No newline at end of file diff --git a/src/main/resources/logback-dev.xml b/src/main/resources/logback-dev.xml new file mode 100644 index 0000000..c5faf7b --- /dev/null +++ b/src/main/resources/logback-dev.xml @@ -0,0 +1,36 @@ + + + + + + + + ${LOG_PATTERN} + + + + + + ${ACTIVE_LOG} + true + + + + logs/application.%d{yyyy-MM-dd}.%i.log + 100MB + + 512MB + + 3 + + + ${LOG_PATTERN} + + + + + + + + \ No newline at end of file