Skip to content

Commit

Permalink
release: 1.2.4 (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb authored Jan 17, 2025
2 parents 8c3584f + 6ac27ac commit 542827f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/kotlin/org/gitanimals/core/filter/MDCFilter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ class MDCFilter : OncePerRequestFilter() {
}
MDC.put(ELAPSED_TIME, elapsedTime.toString())
}.onSuccess {
logger.info("Request Success with status ${response.status}")
if ((MDC.get(PATH) in ignorePath).not()) {
logger.info("Request Success with status ${response.status}")
}
}.also {
MDC.remove(TRACE_ID)
MDC.remove(ELAPSED_TIME)
Expand All @@ -43,5 +45,9 @@ class MDCFilter : OncePerRequestFilter() {
const val TRACE_ID = "traceId"
const val ELAPSED_TIME = "elapsedTime"
const val PATH = "path"

private val ignorePath = setOf(
"/actuator/prometheus"
)
}
}

0 comments on commit 542827f

Please sign in to comment.