5. Logs Aggregation: Spring Boot 3 -- OpenTelemetry -- Loki -- Grafana

Ғылым және технология

In this video, we're going to extend a bit the diagram in the previous video with the appearance of Loki. By this you can get some foundation knowledge about Spring Boot 3 Actuator, Micrometer, OpenTelemetry SDK logs work together, and have some playground to play with OpenTelemetry Connector, Loki and Grafana
Github: github.com/nlinhvu/hello-service
Spring Boot 3 Observability Series: • Spring Boot 3 Observab...
References:
Otel Changelog: github.com/open-telemetry/ope...
Spring Boot Logging: docs.spring.io/spring-boot/do...
Logback OpenTelemetry Appender: github.com/open-telemetry/ope...
Loki: grafana.com/docs/opentelemetr...
Grafana Datasources: grafana.com/docs/grafana/late...

Пікірлер: 21

  • @user-bk7sn3tj1k
    @user-bk7sn3tj1k9 ай бұрын

    Nice. keep doing good work bro.

  • @linhvudev

    @linhvudev

    9 ай бұрын

    thank you very much, hope it was helpful for you!

  • @ThePomelo09
    @ThePomelo097 ай бұрын

    good job! awesome content

  • @linhvudev

    @linhvudev

    7 ай бұрын

    thank you so much, glad you liked it!

  • @girishkuruba3303
    @girishkuruba33037 ай бұрын

    Very detailed videos and very helpful content; the video quality is very poor though. I could hardly see the text.

  • @linhvudev

    @linhvudev

    7 ай бұрын

    sorry for the inconvenience experience! Anyway, thank you for leaving your thoughtful feedback.

  • @hensyou
    @hensyou8 ай бұрын

    Thanks for this video. I noticed we can log directly from log back into Loki using the Loki4j appender. So is it necessary to include the otel collector for this thanks

  • @linhvudev

    @linhvudev

    8 ай бұрын

    Thank you, I really appreciate your question. No, it's not necessary to use OtelCollector in case your services are stable and you're not going to use anything else except Loki. In this video, I'd like to take advantage of OpenTelemetry which is vendor- and tool-agnostic, so for example if the organization policy changes from using Loki to Datadog, AWS CloudWatch,... we can easily update our infrastructure without affecting the service codebase.

  • @hensyou

    @hensyou

    8 ай бұрын

    @@linhvudev got it thanks for the explanation so otpl is added as adapter

  • @fedefede843
    @fedefede8438 ай бұрын

    Well executed Sr!

  • @linhvudev

    @linhvudev

    8 ай бұрын

    thanks very much, hope you enjoy the video!

  • @fedefede843

    @fedefede843

    7 ай бұрын

    @@linhvudev Moved to spring 3.2 and I am having issues to instrument it

  • @linhvudev

    @linhvudev

    7 ай бұрын

    @@fedefede843 yeah, I haven't had time to try it out, I guest some libs are conflict in Spring Boot 3.2 (as you know, 3.1 doesn't support new version of Otel that has log in place). But I think you got the idea right?, you need to provide your SdkLoggerProvider and register it to OpenTelemetrySdk

  • @fedefede843

    @fedefede843

    7 ай бұрын

    @@linhvudev correct! I have sticked to docker json logs imported to loki via promtail or grafana agent in prod stack. The appender is still alpha. Metrics and traces yes, I am moving towards micrometer/otel approach. Thanks!

  • @linhvudev

    @linhvudev

    7 ай бұрын

    @@fedefede843 superb!!

  • @samtx
    @samtx6 ай бұрын

    If log driver is already set to AWS cloud watch in docker ,is promtail required or can log back loki collect logs to second destination

  • @linhvudev

    @linhvudev

    6 ай бұрын

    Sorry buddy! unfortunately I don't have real experiences in AWS so I don't think I can help you out. Anyway, I very appreciate you left the question, thanks

  • @madinabonushirinkulova1696
    @madinabonushirinkulova169627 күн бұрын

    Hi everyone, sorry for late watching the videos. I have a question, i hope you will answer)) I did it exactly like you but I couldnt find OpenTelemetryAppender class in anywhere? this class cannot be imported. If anyone know th solution, then plz let me know!!!

  • @LamTuyen98

    @LamTuyen98

    9 күн бұрын

    you should try to use that exactly version 1.29.0 for each dependencies io.opentelemetry and for io.opentelemetry.instrumentation must have -alpha behind

  • @nguyenhuuhuy1961
    @nguyenhuuhuy19617 ай бұрын

    Cho e hỏi là nếu k có otel-collector thì zipkin, tempo, prometheus, loki có thể lấy traces, metrics, logs trực tiếp từ spring boot services được không? Hay có những công cụ nào tương tự OTLP nữa k a?

  • @linhvudev

    @linhvudev

    7 ай бұрын

    chắc chắn có nha bạn, như zipkin/jeager có protocol của riêng nó, tempo thì có thể sử dụng luôn protocol trên, loki có loki appender để đưa log vào trực tiếp loki,… cơ bản thì trước khi có otel và đợi otel stable thì những tool trên đã có protocol/api/sdk của riêng nó rồi. Otel ra cũng là để giải quyết vấn đề có quá nhiều chuẩn như vậy, OTLP được cho là sẽ là 1 standard protocol mà có thể sử dụng hết bởi tất cả các bên.

Келесі