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

✨ add log monitoring dashboard #131

Merged
merged 4 commits into from
Aug 1, 2024
Merged

✨ add log monitoring dashboard #131

merged 4 commits into from
Aug 1, 2024

Conversation

geoje
Copy link
Contributor

@geoje geoje commented Jul 31, 2024

https://www.baeldung.com/spring-boot-loki-grafana-logging
해당 사이트를 참고하여 그라파나와 로키를 추가하여 로깅에 대한 부분만 모니터링을 추가하였습니다.

매트릭에 대한 정보는 추후 새로운 이슈에서 추가할 것이며 아마 프로메테우스를 사용하여 그라파나로 연결할 것 같습니다.

  • Grafana 데이터 시각화
  • Loki 로그 데이터 수집
  • Prometheus 매트릭 데이터 수집

Spring Boot 는 자신에게 발생하는 로그들을 Loki에게 API 요청을 하여 데이터를 추가합니다.
추가된 데이터를 Grafana 가 Loki에게서 읽은 뒤 label 에 따라 검색할 수 있도록 해줍니다.

Copy link

github-actions bot commented Aug 1, 2024

Overall Project 92.54% 🍏

There is no coverage information present for the Files changed

Copy link

@oshyun00 oshyun00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 처음 접하는 부분이라 공유해주신 링크 내용으로 학습할 수 있었어요. 자료 감사합니다. ☺️

Comment on lines +7 to +10
<springProfile name="test">
<property name="LOKI_URL" value="http://localhost:3100/loki/api/v1/push"/>
</springProfile>

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

테스트를 위한 부분도 추가해주어야 하는군요 👍🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

테스트할 때의 로그는 수집하지 않지만 없을 경우 아래쪽 ${LOKI_URL} 을 읽지를 못하여 ContextLoad 에 실패하더군요. 그래서 더미 값을 추가했습니다!

Copy link

github-actions bot commented Aug 1, 2024

Overall Project 92.54% 🍏

There is no coverage information present for the Files changed

@geoje geoje merged commit 86b5b39 into be/dev Aug 1, 2024
1 check passed
@geoje geoje deleted the be/feat/122 branch August 7, 2024 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Backend ✨ feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants