-
Notifications
You must be signed in to change notification settings - Fork 0
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
✨ add log monitoring dashboard #131
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 처음 접하는 부분이라 공유해주신 링크 내용으로 학습할 수 있었어요. 자료 감사합니다.
<springProfile name="test"> | ||
<property name="LOKI_URL" value="http://localhost:3100/loki/api/v1/push"/> | ||
</springProfile> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
테스트를 위한 부분도 추가해주어야 하는군요 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
테스트할 때의 로그는 수집하지 않지만 없을 경우 아래쪽 ${LOKI_URL}
을 읽지를 못하여 ContextLoad
에 실패하더군요. 그래서 더미 값을 추가했습니다!
|
https://www.baeldung.com/spring-boot-loki-grafana-logging
해당 사이트를 참고하여 그라파나와 로키를 추가하여 로깅에 대한 부분만 모니터링을 추가하였습니다.
매트릭에 대한 정보는 추후 새로운 이슈에서 추가할 것이며 아마 프로메테우스를 사용하여 그라파나로 연결할 것 같습니다.
Spring Boot 는 자신에게 발생하는 로그들을 Loki에게 API 요청을 하여 데이터를 추가합니다.
추가된 데이터를 Grafana 가 Loki에게서 읽은 뒤
label
에 따라 검색할 수 있도록 해줍니다.