Class AlhAlertProperties

java.lang.Object
com.github.catomat0.aoploghelper.alert.AlhAlertProperties

@ConfigurationProperties(prefix="alh.alert") public class AlhAlertProperties extends Object
Configuration for the log-based webhook alert appender.
 alh:
   alert:
     enabled: true
     type: slack                                    # slack | discord
     webhook-url: ${SLACK_WEBHOOK_URL}    # https://hooks.slack.com/services/...
     threshold: ERROR                               # ERROR | WARN
     include-mdc-keys: [requestId, userId, method, uri]
     include-stack-trace: true
     max-stack-lines: 20
     rate-limit-per-minute: 30                      # 0 = 무제한
     connect-timeout-ms: 3000
     read-timeout-ms: 5000
     logger-name-prefix-blocklist:                  # 여기서 시작하는 logger 이벤트는 무시
       - com.github.catomat0.aoploghelper.alert     # 웹훅 실패 로그가 다시 웹훅 발송 방지
 
  • Constructor Details

    • AlhAlertProperties

      public AlhAlertProperties()
  • Method Details

    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
    • getType

      public AlhAlertProperties.Type getType()
    • setType

      public void setType(AlhAlertProperties.Type type)
    • getWebhookUrl

      public String getWebhookUrl()
    • setWebhookUrl

      public void setWebhookUrl(String webhookUrl)
    • getThreshold

      public AlhAlertProperties.Threshold getThreshold()
    • setThreshold

      public void setThreshold(AlhAlertProperties.Threshold threshold)
    • getIncludeMdcKeys

      public List<String> getIncludeMdcKeys()
    • setIncludeMdcKeys

      public void setIncludeMdcKeys(List<String> includeMdcKeys)
    • isIncludeStackTrace

      public boolean isIncludeStackTrace()
    • setIncludeStackTrace

      public void setIncludeStackTrace(boolean includeStackTrace)
    • getMaxStackLines

      public int getMaxStackLines()
    • setMaxStackLines

      public void setMaxStackLines(int maxStackLines)
    • getRateLimitPerMinute

      public int getRateLimitPerMinute()
    • setRateLimitPerMinute

      public void setRateLimitPerMinute(int rateLimitPerMinute)
    • getConnectTimeoutMs

      public int getConnectTimeoutMs()
    • setConnectTimeoutMs

      public void setConnectTimeoutMs(int connectTimeoutMs)
    • getReadTimeoutMs

      public int getReadTimeoutMs()
    • setReadTimeoutMs

      public void setReadTimeoutMs(int readTimeoutMs)
    • getLoggerNamePrefixBlocklist

      public List<String> getLoggerNamePrefixBlocklist()
    • setLoggerNamePrefixBlocklist

      public void setLoggerNamePrefixBlocklist(List<String> loggerNamePrefixBlocklist)