К основному контенту

Сообщения

Сообщения за 2021

Exporting SpringBoot-application metrics to AWS CloudWatch

This is an English version of my article posted here: https://habr.com/ru/company/luxoft/blog/512628/ With no doubt, it's necessary to know how your application performs in production. It's metrics, that can provide this knowledge: either technical (CPU, Memory, Disk utilization) or business ones (the number of daily orders for instance). Instant data slice is not so representative as a certain frame of data. Here is where gathering, storing and viewing those metrics come into play. The need for metrics will only increase if your product, your application which might seem a monolithic one for the users, actually consists of several interacting services. Moreover, if those services are hosted in a cloud. Can have a bunch of  Carolina Reapers  with all that in place, feeling it? The Subject This article will go through the practical steps of gathering Spring Boot-based applications (services) metrics and exporting them to AWS CloudWatch . This would be a step-by-step guide with d

Use @SpringBootTest for validator's unit test and be fast enough

This a continuation of the post: https://live-scripts.blogspot.com/2020/02/unit-testing-object-validation-with-di-in-validator.html#more . Last time we talked about testing a validator, which has a dependency. Using pure @SpringBootTest turned out to be too slow. So I showed a "trick" to override the validator's factory in order to inject the dependant object. This reduced test run time. I promised to show a way to use @SpringBootTest , autowiring, and still be quick enough.