Тёмный
Linh Vu
Linh Vu
Linh Vu
Подписаться
Interested in Observability, Security, Performance and the details of Spring implementation,... let's check them out together 🎉🚀!

When started Web Development, I wished I could have found resources that pointed out the right way/best practice to use Spring components as well as how they're used in Production, how to secure, monitor, alert, and scale out with confidence. Now as a Spring Enthusiast and also a Certified Google Cloud Architect, it’s my pleasure to share my knowledge, my learning journey with you guys and hope we can learn them together ✨🥰.

Thank you so much for watching these video.

Github: github.com/nlinhvu
Stackoverflow: stackoverflow.com/users/6601800/linh-vu
Комментарии
@yuriandrade8337
@yuriandrade8337 2 дня назад
Im using RestClient now, but i do miss the retry structure built in WebClient, it was more straightforward
@saidmzee4107
@saidmzee4107 2 дня назад
Hello Linh, if prometheus is scraping metrics from collector and the collector has metrics from various services. how can I get the names of the services on prometheus/grafana? so that the dashboards will also contain names of the services
@maneshipocrates2264
@maneshipocrates2264 7 дней назад
Good job! How about sending logs to grafana cloud instead?
@turalmirzayev112
@turalmirzayev112 14 дней назад
Why you used both of zipkin and jaegar? What is differ of them?
@alexisantonindioulo4225
@alexisantonindioulo4225 15 дней назад
Hello i use grafana and prometheus but when i configure prometheus, i see this error connect: connection refused the stack are Docker Compose Java Spring Boot Gradle
@AlinaLapina
@AlinaLapina 15 дней назад
Thank you! Amaising stuff! Structured and thorough. Could be nice to see how to unit test retry logic.
@bryamlopez8965
@bryamlopez8965 16 дней назад
Hi! I saw that the Loki exporter for OpenTelemetry is deprecated. Could you update your video or provide guidance on how to send logs from OpenTelemetry Collector to Loki using a supported method? Any tips or new configurations would be really helpful! Thanks!
@claudiosilvajunior1206
@claudiosilvajunior1206 24 дня назад
very cool, helped me a lot, thank you
@BabaykaMoscow
@BabaykaMoscow 26 дней назад
Could you please explain how to setup RestClient to fully ignore SSL verification errors?
@abhaymishra9934
@abhaymishra9934 28 дней назад
Nice video, very helpful.
@khanhvuong26
@khanhvuong26 Месяц назад
series hay quá anh ơi, em học được rất nhiều kiến thức mới từ series này. Cảm ơn anh rất nhiều
@hemanthk4035
@hemanthk4035 Месяц назад
Great content Thanks !
@user-dy8mo9pe2o
@user-dy8mo9pe2o Месяц назад
Thank you. Its very useful video.
@LamTuyen98
@LamTuyen98 Месяц назад
Tks for these 3 lesson how to use GraalVM Native Images series, although I dont know how to best practice this but i find it useful, broaden my knowledge. I am using maven so it takes me a long day to search and follow but finally I finished this series. Looking for more high technique, skills in the future
@user-mq9yu3sg7j
@user-mq9yu3sg7j Месяц назад
Hi I managed to add custom metrics to my spring actuator but I am unable to send them to my DD agent, I am trying to use built-in statsd as shown in spring documentation with no success
@linhvudev
@linhvudev Месяц назад
I understand that you're using 'io.micrometer:micrometer-registry-statsd'. Then making sure the connection is established between your application -> stastsd (by default, micrometer will send metrics to statsd at localhost:8125) , and disable `runtime metrics` of DD (DD_RUNTIME_METRICS_ENABLED=false). FYI: if your custom metrics are about latency, requestCount,... just simply use Java Agent in combination with stastsd, your traces will be sent and calculated into `trace metrics` that include your needs.
@user-mq9yu3sg7j
@user-mq9yu3sg7j Месяц назад
@@linhvudev Thank you for your quick response! I ended up using the spring actuator metrics I was missing just importing the 'io.micrometer:micrometer-registry-statsd'. Then I followed spring documentation and everything worked!
@jsimek
@jsimek Месяц назад
Really great job. It is the best tutorial on Spring observability currently available
@linhvudev
@linhvudev Месяц назад
thank you!
@hamidmohammadi8570
@hamidmohammadi8570 Месяц назад
Hi, where is the secure location to store key store.p12 file?
@linhvudev
@linhvudev Месяц назад
any secret manager should be ok.
@LamTuyen98
@LamTuyen98 Месяц назад
Very helpful video. It's good to hear a thorough explanation. And the java website is top notch
@linhvudev
@linhvudev Месяц назад
thanks!
@crisor6645
@crisor6645 Месяц назад
Gracias por el video!
@linhvudev
@linhvudev Месяц назад
thanks!
@lytung1532
@lytung1532 Месяц назад
It's helpful. Thanks!
@linhvudev
@linhvudev Месяц назад
thanks!
@kam1234554321
@kam1234554321 Месяц назад
Sorry but after 3 minutes I was unable to finish the video. It's so diffucult to follow when you are skipping/changing letters in word like "Servid" instead of "Service" or "lient" instead of "client" (and you keep repeating these words many many times) or other like "lelved" instead of "level", "experiend" instead of "experience". I'm not sure why but you were able to pronounce "c" letter in "documentation" (and you are able to pronounce "s" letter as well) but you change it in all other words. I had to rewind the video few times and listen to it again but after 5 minutes I realized I'm still 3 minutes into the video. I believe this video is very informative but even on the weekend in my free time I don't have 1h to watch this video (with rewinding every 10 seconds because I didn't get what you are saying). Before anyone says "chill dude, it's his accent, he is not a native speaker". Well, me too as you can notice by reading this comment (I bet I did some mistakes) but you were able to follow my message till this sentence which means it's good enough to understand me. It's a honest opinion about the video. He can try to improve next time and someone had to say it. Cheers
@maneshipocrates2264
@maneshipocrates2264 2 месяца назад
Thanks for the video. Can someone use this to export to Grafana cloud?
@VuTran-wy7xb
@VuTran-wy7xb 2 месяца назад
hi a, cho em hỏi em muốn deploy ứng dụng spring boot lên 2 gke khác region, và sẽ có 2 tầng load balancer, tầng 1 sẽ điều hướng user ở vùng đó vào được gke gần nhất, và tầng 2 là load balancer trong internal từng gke, giả sử trong gke em scale instance lên multiple em research mà không rõ google cloud có support mô hình này không ạ?
@LamTuyen98
@LamTuyen98 2 месяца назад
Chào anh ạ, e cám ơn bài hướng dẫn của a về OpenTelemetry này. E cũng đang có 1 dự án tích hợp nó với Spring MVC mà exporter của nó là Jaeger với Elasticsearch/Kibana, và tương lai sẽ đổ data tracing từ Jaeger và customize data đó trong Kibana dashboard ạ. Anh có thể hướng dẫn 1 ít về cách sử dụng đổ data về Jaeger và từ Jaeger sẽ customize tới Kibana dashboard được không ạ.
@madinabonushirinkulova1696
@madinabonushirinkulova1696 2 месяца назад
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 Месяц назад
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
@julianoribeiroamerico3422
@julianoribeiroamerico3422 2 месяца назад
Great content! Is there a way to get the certificate and private key from properties as plain text for production?
@linhvudev
@linhvudev 2 месяца назад
you can refer to the first tip docs.spring.io/spring-boot/reference/features/ssl.html
@siddhiagarkar130
@siddhiagarkar130 2 месяца назад
I do not want to have the default buckets at all. Only the customized ones. How do I do that?
@matsior_
@matsior_ 2 месяца назад
Hi, I want to publish some database state metrics (for example some business data). It can be achieved by using @Scheduled annotation and perform query which will fetch statistics and register them in MeterRegistry. But I'm not sure if using scheduler for that is good idea. Is there a better way to do that?
@jurgen5557
@jurgen5557 2 месяца назад
I fell a little behind watching your videos - but I catch up now. Retry is another wonderful, advanced topic. Thanks for sharing. One little recommendation - as I see you always struggling to import classes manually when adding/uncommenting code. I used to do that too for years. But there is a setting in IntelliJ: Enable "Add unambiguous imports" (and maybe Optimize imports) in Settings>Editor>General>AutoImport 😄
@linhvudev
@linhvudev 2 месяца назад
thank you very much! I just applied both "unambiguous import" and "optimize imports" 😆
@JayanthReddy-jk5jx
@JayanthReddy-jk5jx 2 месяца назад
Hi Linh, Do we need to have the postgres installed on our local machine, before doing this development. Thanks for your valuable information on the OTEL using Java SDK.
@linhvudev
@linhvudev 2 месяца назад
personally, I always prefer using docker instead of installing locally, we can start/shutdown whenever we want, be flexible to use different versions of postgres,...
@rsrini7
@rsrini7 2 месяца назад
Amazing Stuff Linh Vu. Thanks for sharing the knowledge.
@linhvudev
@linhvudev 2 месяца назад
thank you very much 😊!
@JimmyDevAndGeek
@JimmyDevAndGeek 2 месяца назад
Hi, your videos are amazing, but I'm facing an issue with my Spring Boot app deployed on a Cloud Run service in GCP. When it's deployed, the JPA and Hikari pool start up fine, but they shut down abruptly after a second. A few minutes later, I can't make any more requests because both instances have shut down unexpectedly. I need help, please.
@linhvudev
@linhvudev 2 месяца назад
For a normal Spring Boot app, it'll create 10 connections in its pool, and you can check your CloudSQL metrics to see whether 10 connections being acquired. if you're using the lowest-price CloudSQL as in the video, probably you reached to connection limit of CloudSQL, especially if you were running multiple instances of Cloud Run.
@AshokKumar-bu2gk
@AshokKumar-bu2gk 2 месяца назад
Thanks a lot
@linhvudev
@linhvudev 2 месяца назад
thank you 😊!
@natureloverJ
@natureloverJ 2 месяца назад
Hi Linh Good stuff. Please zoom editor fonts while making a video. It is difficult to see.
@linhvudev
@linhvudev 2 месяца назад
many thanks! will do
@naveenjava8496
@naveenjava8496 2 месяца назад
Thanks for sharing. Nice explanation. Can we order the build information. I am wondering if there is any option to display build information first and all other information below that.
@linhvudev
@linhvudev 2 месяца назад
thanks, I'm not sure if they've developed that feature recently, but I wasn't aware of that feature at that time!
@vivekbytes
@vivekbytes 3 месяца назад
Excellent tutorial!
@linhvudev
@linhvudev 2 месяца назад
thank you, glad you liked it!
@sefacihangir8959
@sefacihangir8959 3 месяца назад
Thank you for this in-depth explanation! Thanks for sharing your knowledge.
@linhvudev
@linhvudev 3 месяца назад
Glad you enjoyed it!
@rsrini7
@rsrini7 3 месяца назад
Thanks for the wonderful explanations with debug in detail
@linhvudev
@linhvudev 3 месяца назад
glad you liked it!
@andrew_nguyen05
@andrew_nguyen05 3 месяца назад
Cảm ơn bạn nhiều lắm, rất nhanh gọn !
@viewer_evgeniy
@viewer_evgeniy 3 месяца назад
Finally, I could find solid info about RestClient. But I'm wondering if I use several different restclient beans, how do I register interceptor for each of them at once instead of duplicating .requestInterceptor() method call?
@linhvudev
@linhvudev 3 месяца назад
how about creating a separated method receiving a RestClientBuilder and returning a RestClient, so every time you inject a RestClientBuilder, call this method to build up a RestClient.
@ajeethkumarr6744
@ajeethkumarr6744 3 месяца назад
It's a Good KT, I have an issue with exporting "Actuator" traces to zipkin and jaeger somehow I don't see any info in zipkin & jaeger UI, I would really great to hear from you
@ajeethkumarr6744
@ajeethkumarr6744 3 месяца назад
hey there, I'm using same configs in both prometheus.yml and otel-collector.yml. still I don't see "jvm" related metrics can you help me with this ?
@ajeethkumarr6744
@ajeethkumarr6744 3 месяца назад
I have use the latest image of otel/opentelemetry-collector-contrib that seems a problem, then I switched to otel/opentelemetry-collector-contrib:0.82.0 not it works
@asterixcode
@asterixcode 4 месяца назад
Nice video, thanks for it! Would you recommend retry for when the system throws write conflict exception when 2 service classes try to update the same document in mongodb database within @Transactional methods (with mongotransaction enabled) ? If no, would you have another suggestion on how to handle those cases? Thanks!
@linhvudev
@linhvudev 4 месяца назад
thank you! For your question, honestly, I don't get it, you let your own 2 classes update the same document in one transaction, so even you try to retry, it's gonna happen again. Usually stateful retry is used when, for example, in one transaction, you first create 1 invoice(successful) then you update a order(failed), so if you're using stateless retry, your method will run again then it will create 1 another invoice and update update a order, so you'll end up with 2 invoices. This is where you need stateful. But personally, I prefer accepting errors and let's client do another request again, just like we usually do with requests so far.
@madhand6045
@madhand6045 4 месяца назад
Hey I have a question while doing this we need a otel collector and promethues up and running on top of java agent which will instrument java metrics and it will be collected by otel collector and it getting pushed to prometheus correct
@linhvudev
@linhvudev 4 месяца назад
let's take a look at the diagram, you'll see the arrow from hello-service to collector, it means service "pushes" metrics to collector. On the other side, the arrow is from prometheus to collector, it means prometheus "pulls" (scrape) metrics from collector. Hope it will help you in later videos!
@madhan5407
@madhan5407 4 месяца назад
Yeah man got it
@matsior_
@matsior_ 4 месяца назад
Nice video! Do you think interceptors should be registered as spring beans? Or just creating new one when we need as in yours example?
@linhvudev
@linhvudev 4 месяца назад
Nice question! It simply depends on your interceptor can be shared across multiple RestClient instances (if you have multiple RestClient instances). For example: all RestClient instances intercept a request to add a same headers to downstream services => you can register 1 interceptor bean and inject it to all instances. But if your interceptor behaves different for every services, new Interceptor(String hiServiceToken) for HiService, new Interceptor(String helloServiceToken) for HelloService => you need to create 1 interceptor instance for 1 RestClient instance. Avoid making stateful interceptors, it's a different story, anyway, yeah, understand what you're using.
@matsior_
@matsior_ 4 месяца назад
Do you think interceptor is good place to call some SSO? When we need additional authorization in request
@linhvudev
@linhvudev 4 месяца назад
@@matsior_ yes, it absolutely is, RestClient.interceptor is WebClient.filter in Reactive context. In Reactive, you'll have ServerOAuth2AuthorizedClientExchangeFilterFunction is already supported. But the similar thing in RestClient is being developed, an issue was raised nearly a year ago github.com/spring-projects/spring-security/issues/13588, an draft version is also discussed there, you could take a look.
@lifexmetric
@lifexmetric 4 месяца назад
Great series on OTEL + Springboot :) The only "suggestions" is, please get better Microphone :P
@linhvudev
@linhvudev 4 месяца назад
thank you 😁, I tried man 🥲, this video was recorded by a new NZXT I just had bought that time, but..
@leandrojpg
@leandrojpg 4 месяца назад
Your video is cool, but please explain to me in a productive environment how to use this? It doesn't make sense to use gcloud because this is for a common user, how do I apply this in production so that someone can connect to the db. without having to use gcloud, think about a large team
@linhvudev
@linhvudev 4 месяца назад
thank you for leaving your question, this is not for common users, this is for developer team checking their database, both of them have their own google account. I think you're asking for business team, right? Then it's a different story, you obviously don't want them to touch your database, and they neither. This case, you may want to streamline your data to BigQuery, visualize them onto Looker Studio (under Dashboards, or even Database tables) and then share your Dashboard to them. Hope this give you an overview of Google Cloud infrastructure.
@markostrisko2370
@markostrisko2370 4 месяца назад
Hi Linh Vu, I really wanted to say big thanks for your amazing videos about Observability. One questions bothers me though. In the previous videos, you used otel-collectors as part of Micrometer project from Gradle. Here, you are using it as a javaagent. I'm kinda confused when to use each one, in which cases? Thanks in advance.
@linhvudev
@linhvudev 4 месяца назад
thanks for your nice words about the Observability series Marko. It seemed like we really have 2 options for auto-instrumentation: instrument-library and java-agent, but in most cases, you can easily/have to choose one option. For example, if you're Devops, you probably will stick with java-agent,... it also depends on your Observability vendor, Datadog only provides the java-agent for auto-instrumentation, OpenTelemetry is also supported by Datadog but requires setting up more things and fewer functionalities. I also refer to a post of Jonatan Ivanov(he works in Micrometer) in one of the comments below, hope you find something useful.
@markostrisko2370
@markostrisko2370 4 месяца назад
@@linhvudev Thanks man for your thorough explanation. I really appreciate, keep up a good work. P.S. since I'm also really interested in Security, I saw your videos about Security as well. One suggestion, try Spring Authorization Server and perhaps make some videos about it. Cheers
@linhvudev
@linhvudev 4 месяца назад
@@markostrisko2370 thank you, yeah, I really want to share my exp with Spring Authorization Server as well, many things to talk about it, add SAML, PCKE, best practices like BFF, Token-Mediating,... but really need time to arrange the content, so I put it off at the moment, however I'll be back with the series as soon as possible.
@markostrisko2370
@markostrisko2370 4 месяца назад
@@linhvudev Yes that would have been awesome. Best practices are always good idea. Thanks and good luck.
@debbh274
@debbh274 4 месяца назад
Still a fan of your open telemetry series. Awesome work. And great examples.
@linhvudev
@linhvudev 4 месяца назад
Really appreciate your nice words, many thanks!
@jurgen5557
@jurgen5557 4 месяца назад
Again, my friend, such great content! Unlike many other channels, you manage to present rather advanced Spring topics in a very clear way, making it easy and a pleasure to follow. I repeat myself, but each vid I learn something new, though I know myself a thing or two here :-). My highlight here were the ClientRequestFactories and its Spring support as Settings class. Did not know about it..
@linhvudev
@linhvudev 4 месяца назад
Thanks again, as always, I really appreciate you leaving your comment!