Lightrun Community Update - Python & Node.js Release

In Web Development


Lightrun Community Update - Python & Node.js Release - read the full article about Node Js update, Web Development and from Lightrun: Developer Observability Platform on Qualified.One
alt

Hi everyone and welcome My name is Amit Shuster, product manager at Lightrun And today we are going to talk about Lightrun latest update Lightrun support for Python and Node.js But before that, for those of you who are not familiar with Lightrun Lets give you a quick overview Lightrun helps developers observe, understand and debug Live production applications Directly from your IDE or CLI We call it shift-left observability Where we give back the power to the developers Lightrun helps you resolve issues faster Increase your productivity and reduce the time to deliver So, lets go and see a demo of the new update As I mentioned before, weve just released Lightrun for Python and Node.js And here you can see the Python Prime App This is an app that calculates the number of primes in a given range And you can see here that I have a "try" block where Im importing Lightrun After that Im using "Lightrun.enable" And using the "agent_config" parameter To bring the configuration from an "agent.config" file Here you can see that I specified the server and the secret And I also have the reference to the agent metadata file Where I set the display name for this application and the different tags So, now lets go and see the plugin Here I have the Lightrun plugin in PyCharm At the top you can see all the different tags, and I have: Backup, Main, Production and Staging And after that all the agents of the different instances of the prime app Where I have: Production, Staging and I have two instances for each enviornment One for main and one for backup Now, what I can do with Lightrun - I can go to anywhere in the code And right click. When Ill right click You can see that I have the Lightrun option and I can choose to add a log or a snapshot Here Im going to add a log I can choose the agent I want the log to be added to And I can also choose a tag to add the log to multiple agents Now Im going to change the format Im going to write prime number, and you the curly brackets to call the "num" parameter You can see the log that was added inline And you can also see it under the relevant agent To consume the logs Im going to open the Lightrun console And Im also going to change the agent log piping Im going to change the log piping to be "Both" This way I can consume the logs both in the application output and in the plugin After a few seconds Ill start see the logs in the Lightrun console And you can see that I have a log line for every prime number the application found You can also see that from time to time, that there is a message That the log point is paused due to high log rate As we are debugging production environment We dont want these log lines to affect service performance So if there are too many logs, the log points are paused Until the quota is restored Now lets disable this log action and lets go and add a snapshot I add a snapshot similar to adding a log Just right clicking, choosing Lightrun and add a snapshot Snapshots are virtual breakpoints that will get me the call stack and all the variables I can also set an expression or a condition And the number of hits that I want for the snapshot Now Ive set the max hit count to two, so I should get two snapshot hits In each hit I can see all the frames, this is the call stack You can see that I have "isPrime" function That was called from the "main" function that was called from the module For each one of them I can see all the variables of the environment So I can see the "i" variable, the square root number and the number itself Using a snapshot I can easily understand what happens in the production environment And resolve issues quicker than ever before The snapshot is represented by the camera icon and you can find it under the agent And also next to the code line number Now lets talk a little bit about Lightrun integrations Lightrun has an integration with Slack, where you can set custom alerts That will be triggered from your Lightrun actions You can also get Lightrun logs into Elastic, Datadog, Logz.io and many many more integrations So you should definitely go and check it out Thats all for today, thank you for watching Make sure to Like and Subscribe to stay up-to-date with all the latest news and updates And we will see you in the next video

Lightrun: Developer Observability Platform: Lightrun Community Update - Python & Node.js Release - Web Development