7 Eylül 2022 Çarşamba

Lightrun

Giriş
Açıklaması şöyle
Adding real-time information to running applications is a hassle that many developers face. Lightrun helps address this problem by providing a suite of tools to incorporate snapshots, metrics, and code-level logs.

This plug-in can prove useful when deploying applications to production environments. The biggest benefit of using it is that it reduces the time spent on debugging. Being able to view logs in real time and evaluating expressions without the need to redeploy or recompile is beneficial to everyone on the dev team.
Snapshot
Açıklaması şöyle
Once we bind a snapshot there, we can detect the proxy types in the stack
Şeklen şöyle. Burada getTransactionManager metoduna snapshot konulmuş ve alttaki "Lightrun Snapshots" kutusunda Spring'e ait proxy'lerin de görülebilir.
Condition ekleme de Breakpoint Condition gibi. Şeklen şöyle



Log Ekleme
Açıklaması şöyle
Lightrun lets you add a new log to a production application without changing the source code. 
...

We can fill out the log statements in the dialog that prompts us. Notice we can use curly braces to write Java expressions, e.g. variable names, method calls, etc.

These expressions execute in a sandbox which guarantees that they will not affect the application state. The sandbox guarantees read only state!

Once we click OK, we can see the log appear in the IDE. Notice that no code changed, but this will act as if you wrote a logger statement in that line. So logs will be integrated with other logs.


Notice that we print both the statement and the arguments so the log output will include everything we need. You might be concerned that this weighs too heavily on the CPU and you would be right. Lightrun detects overuse of the CPU and suspends expensive operations temporarily to keep execution time in check. This prevents you from accidentally performing an overly expensive operation.

Hiç yorum yok:

Yorum Gönder