<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by barış kaya on Medium]]></title>
        <description><![CDATA[Stories by barış kaya on Medium]]></description>
        <link>https://medium.com/@kaya?source=rss-7e063e1c2a64------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6h4eukJSX2Efr9fzC0oQdA.jpeg</url>
            <title>Stories by barış kaya on Medium</title>
            <link>https://medium.com/@kaya?source=rss-7e063e1c2a64------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 13:07:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kaya/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[State of Sidekick Live Application Debugger : 2023 Edition]]></title>
            <link>https://kaya.medium.com/state-of-sidekick-live-application-debugger-2023-edition-8d1002d33679?source=rss-7e063e1c2a64------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d1002d33679</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[debugger]]></category>
            <category><![CDATA[sidekick]]></category>
            <dc:creator><![CDATA[barış kaya]]></dc:creator>
            <pubDate>Wed, 08 Mar 2023 14:05:31 GMT</pubDate>
            <atom:updated>2023-03-08T14:05:31.511Z</atom:updated>
            <content:encoded><![CDATA[<h3>State of Sidekick Live Application Debugger : 2023 Edition</h3><blockquote>Sidekick started its way under Thundra’s wings in 2021 and passed numerous milestones thanks to all contributors along the journey. This article focuses on aftermath of the launch of Sidekick Open-Source &amp; the latest additions to Sidekick’s features. You can find the first part of the journey from start to going open-source here: <a href="https://medium.com/runsidekick/past-present-and-future-of-sidekick-d75649395be2">https://medium.com/runsidekick/past-present-and-future-of-sidekick-d75649395be2</a></blockquote><p>Going from propriety to open-source was a tough decision at the time but considering the state of live debugging market at the time &amp; rooms for improvement for the product, it seems like the we have made the right decision.</p><p>Our <a href="https://www.producthunt.com/products/sidekick-open-source">Product Hunt launch</a> was better than our expectations and we have came 3rd at that days’ rankings. This followed by Sidekick’s repo making it into GitHub trending and helped us reach more than 1k stars in a few days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*omWdkOOPQ3opFSDtMr3scA.png" /><figcaption>Sidekick repository star history</figcaption></figure><p>Features that came after going open-source:</p><ul><li><a href="https://docs.runsidekick.com/use-cases/error-stack-collection-and-stack-based-backend-tests-in-e2e-tests">Error collection</a></li><li><a href="https://docs.runsidekick.com/agents/node.js/data-redaction">Data redaction</a></li><li><a href="https://docs.runsidekick.com/integrations/grafana-plugin-for-remote-controlling-sidekick-actions">Grafana Plugin</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YkVNvFFuFcSfzEvKcPu-3Q.gif" /></figure><ul><li><a href="https://docs.runsidekick.com/plugins/pycharm-plugin-python">PyCharm Plugin</a></li><li><a href="https://docs.runsidekick.com/plugins/webstorm-plugin-node.js">WebStorm plugin</a></li><li><a href="https://docs.runsidekick.com/sidekick-actions/reference-events-and-probe-tags">Saved points</a></li><li><strong>Sidekick Action Tags</strong> :Now you can assign tags to your Logpoints and Tracepoints and use those tags to batch control your actions. Let’s say you have defined tracepoints &amp; logpoints and tagged the ones related to your auth flow with #auth. Once you are having an issue with that flow, you can use this new feature to enable all your predefined logpoints &amp; tracepoints tagged with #auth &amp; collect the necessary information. No more collecting excess amount of logs etc. and getting lost in them, collect what you need only when you need it.</li><li><strong>Remote configuration of agents</strong>: Sidekick Agents used to be wild &amp; free, with our latest update you are now able to <strong>change their attach/detach status, maxFrames, parse depth and enable/disable error stack collection remotely via Sidekick WebIDE &amp; Rest API</strong>. So you can keep Sidekick agents disabled until you really need them and toggle to start collecting data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gpnSuclPtVaE777QNlZQ-Q.png" /></figure><ul><li><strong>Sidekick Test Module : </strong>An external client for Sidekick that opens our way to bring Sidekick actions to tests. Check out <a href="https://medium.com/runsidekick/collecting-error-stacks-from-backend-as-exceptions-occur-in-e2e-tests-a-tutorial-on-cypress-ab36793dde30">Collecting error stacks from backend as exceptions occur in E2E tests — A tutorial on Cypress</a></li><li><a href="https://docs.runsidekick.com/integrations/cypress-plugin-for-e2e-tests">Cypress Plugin for E2E tests</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IS7Xwo2-3h9RzYdVfdOv7g.gif" /></figure><ul><li><strong>New Data Targets for logs &amp; snapshots!</strong><br> Sidekick integrations are growing, and a lot more are on the way. Last month we were busy adding new ones, and you can find the whole list below:<br>- Slack<br>- Logz.io<br>- Sumo Logic<br>- Solarwinds Loggly<br>- New Relic<br>- Elasticsearch<br>- Loki<br>- Coralogix</li><li><strong>Sidekick Dashboard</strong> for exploring &amp; analyzing the collected data.</li><li><strong>Linear &amp; Jira integration: </strong>With Sidekick Web IDE’s latest update, you can use Sidekick-generated logs, tracepoint data &amp; error stacks to create your issues.</li><li><strong>Sidekick Docs also became open-source</strong> using Docusaurus under the hood. <a href="https://github.com/runsidekick/sidekick-docs">https://github.com/runsidekick/sidekick-docs</a></li></ul><p>Recently we have enabled Github discussions in our repository, providing an interactive platform for our community to engage in conversations, ask questions, and share ideas.</p><p><a href="https://github.com/runsidekick/sidekick/discussions">runsidekick/sidekick · Discussions · GitHub</a></p><p>As a member of our community, your contributions and insights are essential to the growth and success of our project. We encourage you to visit our repository, join our discussions, and share your thoughts with us. Together, we can create a better product and a stronger community.</p><p>In conclusion, making Sidekick open source has had a positive impact on our development process, enabling us to collaborate with a broader community of developers and users. By opening up the codebase, we have received valuable feedback and contributions that have helped to improve the software and make it more robust and user-friendly. We are excited to continue this process and welcome new feedback and contributions from the community. With everyone working together, we can create a powerful tool that meets the needs of developers everywhere.</p><p>Finally we have prepared a Sidekick Wrapped 2022 video for you. Make sure to check it out and share your thoughts:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FNaG6oxfm4tc&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DNaG6oxfm4tc&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FNaG6oxfm4tc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/791330b60dd1009b6312e437527df54c/href">https://medium.com/media/791330b60dd1009b6312e437527df54c/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d1002d33679" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Grafana to visualize CI Workflow Stats]]></title>
            <link>https://kaya.medium.com/using-grafana-to-visualize-ci-workflow-stats-2d4e5bfd74ea?source=rss-7e063e1c2a64------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d4e5bfd74ea</guid>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[ci]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[ci-monitoring]]></category>
            <dc:creator><![CDATA[barış kaya]]></dc:creator>
            <pubDate>Wed, 01 Mar 2023 12:16:27 GMT</pubDate>
            <atom:updated>2023-03-01T12:16:27.485Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<p>Grafana is an excellent tool for creating dashboards to gather data from various sources and serve them in a single place. According to <a href="https://thenewstack.io/will-grafana-become-easier-to-use-in-2022/">Newstack,</a> Grafana is the second most popular observability tool, counting 800,000 active installs and over 10 million users. These numbers also include some of our customers, and we have collected much feedback about bringing Foresight’s data &amp; charts to Grafana Dashboards.</p><p>Using a dashboard like Grafana helps teams have a whole view of what the team is doing. Improving visibility and having a streamlined analysis for faster problem-solving. When technical issues arise, having all the data in a single place can help you solve them more quickly. Instead of spending time gathering data from multiple sources, you can access everything you need in one location. This can reduce downtime and minimize the impact of technical issues on productivity.</p><p>Makers define Grafana as “ <em>the open source analytics &amp; monitoring solution for every database</em>” and we wanted to make Foresight one of those. Making it easier for our users to observe their CI workflow health &amp; stats.</p><h3>Introducing Foresight Plugin for Grafana!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iIPq8I4ro5YL50YGBC0IDQ.jpeg" /></figure><p>Foresight is a powerful tool for monitoring and managing your continuous integration (CI) and testing workflows within GitHub Actions. With Foresight, you can easily track key metrics related to your workflows, such as build times, failure rates, etc. Now, with the Foresight plugin for Grafana, you can bring those insights directly into your Grafana dashboards. This plugin enables you to visualize Foresight’s workflow stats, and workflow failure heatmap features directly within Grafana, making it easier than ever to monitor the performance of your workflows and take action when issues arise. Whether you’re a developer, an operations team member, or a project manager, the Foresight plugin for Grafana can help you stay on top of your workflows and improve your team’s productivity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*8tBf29QFICY_ZXDM.gif" /></figure><p>This panel plugin comes with two tabs,</p><p><a href="https://docs.runforesight.com/features/workflow-dashboard">Stats of the workflows:</a></p><ul><li>Total execution count</li><li>Fail &amp; Success Rate</li><li>Fail count</li><li>Average Duration</li><li>P95</li></ul><p><a href="https://docs.runforesight.com/features/highlights#status">Workflow failure heatmap</a></p><ul><li>number of errors per day &amp; workflow</li></ul><p>Many more features are coming, and your feedback is highly appreciated.</p><p>In conclusion, Grafana is a powerful data visualization tool that can help you make sense of your technical data and increase productivity. By bringing all your technical data to a central location and visualizing it in meaningful ways, you can gain insights into your operations, identify areas for improvement, and make data-driven decisions that lead to greater efficiency. With the Foresight plugin for Grafana, you can take your data analysis to the next level by visualizing key CI and testing metrics directly within your Grafana dashboards. To learn more about Grafana and the <a href="https://docs.runforesight.com/integrations/grafana">Foresight plugin</a>, check out the documentation today and explore the power of data-driven decision-making.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4CLDKOCWoKroxS_3.png" /><figcaption><a href="https://app.runforesight.com/signup">https://app.runforesight.com/signup</a></figcaption></figure><p><em>Originally published at </em><a href="https://www.runforesight.com/blog/using-grafana-to-visualize-ci-workflow-stats"><em>https://www.runforesight.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d4e5bfd74ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Redirecting AWS Lambda invocations to local for Debugging & Hot-Reloading without disrupting the…]]></title>
            <link>https://kaya.medium.com/redirecting-aws-lambda-invocations-to-local-for-debugging-hot-reloading-without-disrupting-the-67f8e0f7e46b?source=rss-7e063e1c2a64------2</link>
            <guid isPermaLink="false">https://medium.com/p/67f8e0f7e46b</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[barış kaya]]></dc:creator>
            <pubDate>Wed, 14 Dec 2022 13:00:26 GMT</pubDate>
            <atom:updated>2022-12-15T08:17:57.626Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>Redirecting AWS Lambda invocations to local for Debugging &amp; Hot-Reloading without disrupting the flow</h3><h4>Develop and debug serverless functions using your local IDE while still using the full range of AWS services and features</h4><p>AWS Lambda can offer several benefits, including improved scalability, flexibility, and cost-efficiency. Serverless architectures abstract away many underlying infrastructure details and can make it easier for developers to focus on building and deploying their applications rather than worrying about managing servers.</p><p>Although AWS Lambda and serverless ecosystem comes with many benefits, developing Lambdas can be challenging for various reasons. One of the main challenges is that serverless architectures rely on event-driven computing, which can be difficult to understand and implement. This can make it hard to develop and debug applications and understand how they will behave in production. Additionally, since serverless architectures often involve multiple different services and vendors, it can take time to manage and troubleshoot issues that arise.</p><p>One of the main struggles of local serverless development is the need for more support for all AWS services and features. This can make it difficult to test and debug applications that use services not supported by the local development tools. Additionally, the local environment may not be a replica of the AWS cloud, so there may be behavioral differences between the local and cloud environments. Making it challenging to ensure that an application will work as expected when deployed to the cloud. Another challenge is the complexity of setting up and configuring the local development environment, which can be time-consuming and require specialized knowledge. Finally, local development can be slower and less scalable than cloud-based development, hindering the development process and making it more challenging to work with large or complex applications.</p><h4><strong>Introducing Merloc</strong></h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4LIILFk1qAw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4LIILFk1qAw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4LIILFk1qAw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f92ca20e939adc15e55c16b89ca16e4d/href">https://medium.com/media/f92ca20e939adc15e55c16b89ca16e4d/href</a></iframe><p>MerLoc is an open-source tool that allows developers to redirect serverless invocations from the AWS cloud to a local environment. It enables developers to develop and debug their serverless functions locally without disrupting the application flow in the AWS cloud. Using MerLoc, developers can test their functions against local resources, such as Amazon DynamoDB tables, and debug them using their local IDE. This can speed up the development process and make testing and debugging serverless functions easier. Additionally, using MerLoc can help ensure that the application behaves consistently across the local and cloud environments, reducing the risk of differences in the behavior causing issues when deployed to the cloud.</p><p>MerLoc allows redirection of serverless invocations from the AWS cloud to a local environment and uses the AWS Serverless Application Model (SAM) and SST under the hood for running functions locally. Allowing developers to develop and debug their serverless functions using their local IDE while still using the full range of AWS services and features. MerLoc makes it easy to change where your Lambda functions run with a simple setting that lets you switch between the local and cloud environments. It supports various runtimes, including Java, Node.js, Python, Go, and .NET so it can be used with various languages and frameworks. By keeping everything in the cloud while allowing local debugging, MerLoc can drastically reduce the time lost on mocking AWS resources, which can help to speed up the development process and make it more efficient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*1ek3O4QreF9c5h7EMO_2qw.gif" /></figure><p>MerLoc is available both as an open-source project on GitHub and as a completely managed service by Thundra. The open-source version of MerLoc allows developers to use the tool independently without needing to pay for a subscription or managed service. This can be a good option for developers who are comfortable working with open-source tools and want to try out MerLoc without making a financial commitment.</p><p>Check out the MerLoc repo here:</p><p><a href="https://github.com/thundra-io/merloc">GitHub - thundra-io/merloc: MerLoc is a live AWS Lambda function development and debugging tool. MerLoc allows you to run AWS Lambda functions on your local while they are still part of a flow in the AWS cloud remote.</a></p><p>On the other hand, the managed service version of MerLoc provides a more streamlined and convenient way to use the tool, with support and assistance from the Thundra team. Soon, MerLoc will also be available on <a href="https://runsidekick.com/">Sidekick</a>, an open-source live application debugger for non-serverless applications. This can be a good option for developers who want to get up and running with MerLoc quickly and easily without needing to set up and configure the tool themselves.</p><h4><strong>MerLoc brings hot-reloading and live debugging to Lambdas</strong></h4><p>Hot reloading and live debugging are techniques that can significantly improve the productivity of developers working on serverless applications. Hot reloading allows developers to make changes to their code and see the results in real time without stopping and restarting the application. Saving time and effort, developers can iterate quickly and immediately see the results of their changes.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FO5tYKVpncdo&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DO5tYKVpncdo&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FO5tYKVpncdo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/af007ed03b27bb83fd0b3f1310e4f414/href">https://medium.com/media/af007ed03b27bb83fd0b3f1310e4f414/href</a></iframe><p>On the other hand, live debugging allows developers to step through their code line by line and debug it in real time. This can help developers to identify and fix errors and issues more quickly, as they can see what is happening at each step of the code execution. Together, hot reloading and live debugging can help developers work more efficiently and effectively, allowing them to make changes and debug their code quickly and easily.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FmXNnT5aTVC4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DmXNnT5aTVC4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FmXNnT5aTVC4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a90e3712ec293d5d804df46c4cec556/href">https://medium.com/media/7a90e3712ec293d5d804df46c4cec556/href</a></iframe><p>In conclusion, MerLoc is a valuable tool that can make serverless development more manageable and efficient. By redirecting serverless invocations from the AWS cloud to a local environment, MerLoc enables developers to develop and debug their functions using their local IDE while still using the full range of AWS services and features. This can speed up the development process, reduce the time spent mocking AWS resources, and improve the developer experience. Additionally, hot reloading and live debugging can enhance developer productivity by allowing developers to make changes and debug their code quickly and easily. Overall, MerLoc is a powerful tool that can help developers to work more efficiently and effectively and should be adopted by anyone looking to improve their serverless development experience. You can check out MerLoc’s homepage <a href="https://thundra.io/merloc?utm_source=medium&amp;utm_medium=merloc_blog&amp;utm_campaign=merloc_blog_1_med">here</a>.</p><p>Note: ChatGPT has been used to assist in writing this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67f8e0f7e46b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Collecting error stacks from backend as exceptions occur in E2E tests — A tutorial on Cypress]]></title>
            <link>https://kaya.medium.com/collecting-error-stacks-from-backend-as-exceptions-occur-in-e2e-tests-a-tutorial-on-cypress-ab36793dde30?source=rss-7e063e1c2a64------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab36793dde30</guid>
            <category><![CDATA[cypress]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[cypressio]]></category>
            <category><![CDATA[selenium]]></category>
            <category><![CDATA[e2e-testing]]></category>
            <dc:creator><![CDATA[barış kaya]]></dc:creator>
            <pubDate>Thu, 24 Nov 2022 12:16:32 GMT</pubDate>
            <atom:updated>2022-11-24T16:05:34.002Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>Collecting error stacks from backend as exceptions occur in E2E tests — A tutorial on Cypress</h3><h4>Discover the missing piece of E2E test results</h4><blockquote>This article is the first chapter of the Sidekick Stack-based Testing Series. Tools mentioned in this article (Cypress &amp; Sidekick) are both<strong> open-source, </strong>and after reading it you will learn:</blockquote><blockquote>- How you can include backend exceptions in your Cypress E2E test results</blockquote><p>Exceptions occur in both backend &amp; frontend, and many of them are handled to provide users with trouble-free sessions. Having these error-handling mechanisms is healthy for users’ experience, but they can prevent us, developers, from observing the exceptions and backend-related anomalies in E2E tests.</p><p>E2E tests ensure that the application performs as expected by running the test cases based on the users’ workflows. Tools such as Cypress, Playwright &amp; Selenium enable us to easily define and apply those tests. In this article, I’ll explain backend exceptions, a missing piece of E2E test results, and how we can collect them in a test run in Cypress.</p><p>Well-known E2E testing tools mentioned above allow us to define tests for each action, and there are countless add-ons to improve their abilities. Since those tests are based on users’ behaviors they are mainly focused on frontend experience, and there are barely any significant resources for backend-related test definitions. Most methods/plugins we have are limited to making requests to backend and defining tests based on responses. Although those might be more than enough for mocking users’ perspective, these tests lack depth about backend’s state. Primarily when exceptions are handled, and there is no trace left of anomalies. In the end, even passing all E2E tests might not mean a system with zero issues.</p><p>A way to collect exceptions &amp; stacks from the backend can help us understand the missing pieces in E2E tests. Sidekick’s Test Module comes in handy for this use case. <strong>Sidekick’s Test Module</strong> and it’s upcoming test framework plugins enable developers to bring Sidekick actions (logpoints, tracepoints &amp; error stack collection) to E2E tests, eventually giving developers ability to <strong>collect errors as they happen</strong> and <strong>define stack based tests to ensure reliability of backend’s state</strong>. This article focuses on the first one, collecting backend errors as they occur in a test run.</p><blockquote>Sidekick’s Error Stack Collection gathers real-time stack data from backends whenever they have an exception. You can read more about it here:</blockquote><p><a href="https://medium.com/runsidekick/capturing-exception-call-stacks-from-running-node-js-applications-d9cd81407593">Capturing Exception Call Stacks from Node.js Applications</a></p><p>Error Stack Collection is already helpful for problems in production. With Sidekick’s new Test Module it will also be a literal sidekick to developers for discovering root causes of errors in tests. Such data is nifty for finding neglected issues &amp; root causes of some flaky tests.</p><h3>Setting up Error Stack Collection within our E2E tests in Cypress :</h3><p>Our setup will be consisted of a simple Node.js To-Do application powered by Express framework. We will define tests in Cypress as we normally do and observe stacks of exceptions thrown in the backend as a result of those tests.</p><p>You can find To-do app’s repo here:</p><p><a href="https://github.com/boroskoyo/todos-express-password-sidekick">GitHub - boroskoyo/todos-express-password-sidekick: Todo app using Express and Passport for sign in with username and password.</a></p><h4>Requirements:</h4><ul><li>Cypress (this can be applied in any other test framework)</li><li>Having a Sidekick SaaS account or a Sidekick Open-Source Broker up and running: <a href="https://www.runsidekick.com/">https://www.runsidekick.com/</a></li><li>A Node.js backend configured to work with Sidekick agent (Sidekick Error Stack Collection in supported in both Node.js &amp; Python runtimes)<br>- Check the example setup here: <a href="https://www.youtube.com/watch?v=tc9TupvV-TM&amp;ab_channel=Sidekick%28byThundra%29">https://www.youtube.com/watch?v=tc9TupvV-TM</a><br>- Related docs: <a href="https://docs.runsidekick.com/installation/agents/node.js/error-stack-collection">https://docs.runsidekick.com/installation/agents/node.js/error-stack-collection</a></li><li>Sidekick Test Module up and running:<br>- An open-source project that can be found here: <a href="https://github.com/runsidekick/sidekick-test-module/">https://github.com/runsidekick/sidekick-test-mode</a></li></ul><h4>Setup:</h4><p>Before starting our test, we need to setup the Sidekick agent &amp; enable error stack collection.</p><p>1- Installing Sidekick agent to our backend</p><p>You can find extra info here: <a href="https://docs.runsidekick.com/installation/agents/node.js/installation">https://docs.runsidekick.com/installation/agents/node.js/installation</a></p><pre>//add the code below block to top of your project<br>const SidekickDebugger = require(&#39;@runsidekick/sidekick-agent-nodejs&#39;);</pre><p>2- Enable Error Stack Collection mode</p><pre>...<br>//after importing Sidekick Agent, initialize it with the given configuration<br>SidekickDebugger.start({ <br>  applicationName: &#39;Todo - Express&#39;,<br>  applicationStage: &#39;prod&#39;,<br>  applicationVersion: &#39;1.0.0&#39;,<br>  apiKey: &#39;&lt;Sidekick-api-key&gt;&#39;,<br>  errorCollectionEnable: true,<br>  errorCollectionEnableCaptureFrame: true<br>});<br>...</pre><p>Now your backend is ready for our tests.</p><p>3- Configure &amp; Start Sidekick Test Module (check its repo for more info)</p><p><em>Now we are good to go!</em></p><p><strong>Test definition:</strong></p><p>The user will login to the system before each test.</p><p>First, it will add a new item “Feed the cat” and check if it is added.<br>Secondly, it will try to add a new item with an empty string and expect nothing to change. Submitting an empty string results in an error in our backend, but we are catching those errors so that user is not inconvenienced.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gxRkZtDUpisWc_mY5L9DCg.png" /><figcaption>UI test results in Cypress</figcaption></figure><p>Finally, in the last test, we will make a request to Error Stack endpoint of Sidekick Test Module to get collected errors within the error. The expected result is an empty array, and anything else means that we had an issue in our backend.</p><p>You can find the example definition below:</p><pre>...  <br>  it(&quot;Check backend errors&quot;, () =&gt; {<br>    const getErrorStacks = {<br>      url: &quot;http://localhost:8081/api/events/errorstack&quot;,<br>      headers: {<br>        Authorization: &quot;Bearer apikey&quot;,<br>      },<br>    };<br>    cy.request(getErrorStacks)<br>          .its(&quot;body&quot;)<br>          .should(&quot;be.an&quot;, &quot;array&quot;)<br>          .and(&quot;have.length&quot;, 0);<br>      });<br>...</pre><h4>Results:</h4><p>As our test completes, we can see that although our frontend-related tests pass, our E2E test fails as Sidekick had collected errors when it tried to submit an empty string in the test run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*BEzvM6hvtU84CrkJFzCkyA.png" /><figcaption>Overall test results</figcaption></figure><p>If there are errors occur in the backend, Sidekick Test Module should return a list of collected errors and their stacks, as seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oSMw4FqQKx-bQIIe_mM4gA.png" /><figcaption>Failing test case and collected error information</figcaption></figure><p>Now we can click on the related line to get info about the collected error or check the error from any Sidekick client (Web IDE, VSCode, or JetBrains IDEs). Soon we will bring a better view of those errors with our upcoming Cypress plugin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JjGSluJEV-Em-oo5Fa_IaQ.png" /><figcaption>Detailed information about collected error’s stack</figcaption></figure><p>In conclusion, we have used Sidekick agent &amp; Test Module to bring backend errors to our E2E test, and we were able to capture the snapshot of the state of our backend as it threw an exception.</p><h4>Where to go from here:</h4><p>With our current setup, we got in-depth error information from our backend apps. In further chapters, we will be bringing Sidekick’s tracepoint (non-breaking breakpoint) feature to Cypress that will allow us to define tests based on state and stack information of our backend. Right now, we are also working on a Cypress plugin that will make using Sidekick Actions within Cypress as easy as it gets, and your support and feedback will guide us through our road. After Cypress, supporting other test frameworks is on our roadmap. You can find us at <a href="https://www.runsidekick.com/discord-invitation">Discord</a> or contact us via our website <a href="https://runsidekick.com/">https://runsidekick.com</a> if you want to participate or become a part of our community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab36793dde30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Live Debugging Python Applications]]></title>
            <link>https://kaya.medium.com/live-debugging-python-applications-cbec3e4099ab?source=rss-7e063e1c2a64------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbec3e4099ab</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[remote-debugging]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[debug]]></category>
            <dc:creator><![CDATA[barış kaya]]></dc:creator>
            <pubDate>Wed, 23 Nov 2022 14:24:07 GMT</pubDate>
            <atom:updated>2022-11-23T14:24:07.296Z</atom:updated>
            <content:encoded><![CDATA[<h4>Speed up finding the root cause and minimize the impact of such incidents</h4><p>A few months back, I read an interesting story where astronauts in the International Space Station had to abandon a mission and seek shelter due to a cloud of orbital debris. According to an article by <a href="https://www.nationalgeographic.com/science/article/russia-just-blew-up-a-satellite-heres-why-that-spells-trouble-for-spaceflight">National Geographic</a>, it is a result of Russian anti-satellite missile testing (Nudal ASAT), performed live for the first time on an actual object in orbit.</p><p>This incident made me think of how things can act differently in production compared to development and testing environments. As developers, we often face these unexpected scenarios. And sometimes it is impossible to recreate them locally to find solutions.</p><p>However, having a standard live debugging mechanism in production will significantly speed up finding the root cause and minimize the impact of such incidents. So, in this article, I will discuss how we can use live debugging in Python applications to give you a better understanding.</p><h3>Importance of Debugging in Production Environments</h3><p>As we all know, testing is an essential part of the development process before releasing into the production environment. Especially modern applications go through extensive manual and automatic testing processes to identify potential bugs.</p><p>However, its hardly possible detect all issues prior to production since these environments have differences from one another. For example, there are errors, caused by data, access patterns, load in production is difficult to replicate identically in development and testing environments. Therefore, we have to debug such errors in the production.</p><p>As developers, we must be aware of different tools and approaches we can use for remote debugging to improve efficiency. <a href="https://docs.runsidekick.com/">Sidekick</a>, is one such tool that provides a web IDE &amp; IDE plugins for real-time application debugging. So, let’s see how we can use Sidekick with Python.</p><h3>How to Integrate Sidekick with Python Applications</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sD8L33ocW_71RCRV.png" /></figure><p>In this article, I will be creating a simple Python application with distributed microservices using Flask. Then, I will connect it to the Sidekick web IDE and discuss how to use it for live debugging for Python applications.</p><h3>Step 1 — Create a Sidekick account</h3><p>As the first step, you need to create a<a href="https://app.runsidekick.com/signup"> Sidekick account</a>. After that, you can easily signup with Sidekick using your Google or GitHub account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HWnZn1ynTXtOXgWq.png" /></figure><h3>Step 2 — Install sidekick-agent-python to your application</h3><p>After creating your Python project, you need to install sidekick-agent-python to connect the application to Sidekick.</p><pre>pip install sidekick-agent-python</pre><p>Then, you need to configure the environment variables. Sidekick requires the following as environment variables, and you can use a .env file to include them.</p><pre>SIDEKICK_APIKEY= &lt;API-KEY&gt;<br>SIDEKICK_APPLICATION_NAME= POST_APP<br>SIDEKICK_APPLICATION_STAGE= PROD<br>SIDEKICK_APPLICATION_VERSION= 1.0.0</pre><p>You can find SIDEKICK_APIKEY on the home page of Sidekick IDE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/0*CSyCduYHESDr6kFW.png" /></figure><p>Finally, you can add Sidekick to your application and enable tracing as follows:</p><pre>from pathlib import Path<br>from dotenv import load_dotenv<br><br>env_path = Path(&lt;.env file path&gt;).resolve()<br>load_dotenv(dotenv_path=env_path)<br><br>try:<br>    import tracepointdebug<br>    tracepointdebug.start()<br>except ImportError as e:<br>    pass</pre><h3>Step 3 — Connect the application to Sidekick web IDE</h3><p>Sidekick allows you to connect GitHub, GitLab, and Bitbucket repositories directly to the web IDE. You can use the source tab in the IDE to select your repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5o3O0KzPgQ4ngu8K.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/0*KjCAhcho5aVOEjPQ.png" /></figure><p>Most importantly, you don’t need to worry about the security of your repository since Sidekick will only have read access to your source code, and it will never fetch the code into their servers.</p><h3>Step 4 — Enabling Tracepoints</h3><p>After connecting the Git repository, you need to connect your application to Sidekick IDE and enable tracepoints. At the Applications tab you will see a list of applications that use your Sidekick API key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/0*NpmqrtjuMW9TI7NS.png" /></figure><p>Please note that your application must be running to get listed in the Applications tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I18CwCuPFZIR2y5_.png" /></figure><p>Then, you can create tracepoints (non-breaking breakpoints) in the Sidekick editor, and all the tracepoints will be listed in the Tracepoints tab.</p><p>That’s it. You have successfully integrated Sidekick for your Python application. Now, you can start monitoring the application using tracepoints.</p><h3>Debugging with Sidekick</h3><p>As mentioned, Sidekick tracepoints are a type of nonbreaking remote breakpoints. Tracepoints do not pause your codes as normal breakpoints, and they can also work with Thundra’s distributed technology to enable connections between several tracepoints in a transaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rulYPUk3K2QFHlOW.png" /></figure><p>After enabling tracepoints, Sidekick will automatically start collecting snapshots of the local variables when the application execution passes that tracepoint. You can find those events in the Sidekick Events tab and filter them by any text or distributed trace IDs.</p><p>The above image shows the tracepoint events of the posts service in the example application.</p><p>However, taking snapshots every time, even without any issues, might not be the ideal approach. Sidekick provides conditional tracepoints to overcome this issue, and you can enable a tracepoint based on a specific condition you define.</p><h3>Using Conditional Tracepoints in Sidekick</h3><p>Although the posts service of the example application worked as expected, the user service didn’t return the expected response. Instead, it returned an empty response when the get users endpoint is invoked. So, let’s place a conditional tracepoint in Sidekick IDE to trigger to find the reason for this behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/0*weILWBqkoucVf96t.png" /></figure><p>You have to pick the tracepoint you need to edit from the tracepoint list and click the edit icon to enable conditional tracepoints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*LAnQxrujZNaSq5u6.png" /></figure><p>It will open a new window like below, where you can define the condition. In this example, the following tracepoint will only take snapshots if the response status code is not equal to 200.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/0*FcX0k6obH7jUPhC3.png" /></figure><p>You need to rerun your application and explore the tracepoint snapshot to get more details.</p><p>As you can see, the response code for the API request is 404, and the reason is Not Found. It means that the application can not find the API we are calling. So, there must be an error in the API path. Likewise, you can easily use Sidekick IDE to monitor and debug issues with your production-level applications easily.</p><p>Besides, Thundra provides a trace map feature where you can visualize the high-level components in your application and trace its behavior in real-time. It helps to identify issues that span across components and identify what’s causing them. For that, you need to integrate the Thundra APM agent. You can find more details about that in<a href="https://docs.runsidekick.com/integrations/tracing-integrations"> Thundra documentation</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/0*gC3Vb5iol9uLrptv.png" /></figure><p><em>Tracemap of sample ToDo app configured with Sidekick &amp; Thundra</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X3Yg_96DJZuy0lZW.png" /></figure><p><em>Live Stack Tracing using Sidekick Sidekick &amp; Thundra</em></p><p>The images below show a trace map of a sample ToDo app configured with Thundra &amp; Sidekick and a live stack trace provided by Thundra.</p><h3>Conclusion</h3><p>In this article, I have discussed the importance of remote debugging production environments and how to integrate Sidekick with a Python project. Sidekick resolves a burning problem in monitoring and debugging live environments. It has introduced non-breaking breakpoints (tracepoints), and developers can monitor application status without pausing the application workflow.</p><p>I hope this article will help you improve the remote debugging of your applications and improve the productivity of your development work. Thank you for reading!</p><p><em>Originally published at </em><a href="https://www.runsidekick.com/blog/live-debugging-for-python-applications"><em>https://www.runsidekick.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbec3e4099ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The way we develop software evolves, way we debug can’t stay the same!]]></title>
            <link>https://kaya.medium.com/the-way-we-develop-software-evolves-way-we-debug-cant-stay-the-same-98125b685195?source=rss-7e063e1c2a64------2</link>
            <guid isPermaLink="false">https://medium.com/p/98125b685195</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pycharm]]></category>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[barış kaya]]></dc:creator>
            <pubDate>Wed, 19 Oct 2022 12:54:25 GMT</pubDate>
            <atom:updated>2022-10-19T12:54:25.165Z</atom:updated>
            <content:encoded><![CDATA[<h4>Bringing the simplicity of print() to production debugging using PyCharm</h4><p>Writing clean and readable code, adding tests and everything is a must for today’s software development teams but it is never enough to avoid bugs from appearing.</p><p>As it is explained in Fireship’s latest video, the best way to avoid writing bugs is to avoid writing code.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FX3jw1JVNdPE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DX3jw1JVNdPE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FX3jw1JVNdPE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c65023af5c90f747446b5a798cccdf49/href">https://medium.com/media/c65023af5c90f747446b5a798cccdf49/href</a></iframe><p>You might think having a QA team or constantly testing your software is enough but the tweet below is a great example of what you will experience in the real life:</p><h3>Brenan Keller on Twitter: &quot;A QA engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 99999999999 beers. Orders a lizard. Orders -1 beers. Orders a ueicbksjdhd. First real customer walks in and asks where the bathroom is. The bar bursts into flames, killing everyone. / Twitter&quot;</h3><p>A QA engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 99999999999 beers. Orders a lizard. Orders -1 beers. Orders a ueicbksjdhd. First real customer walks in and asks where the bathroom is. The bar bursts into flames, killing everyone.</p><p>Even though the way we structure our code or develop architectures changes, <strong>anomalies, and bugs are here to stay.</strong> So we should start by accepting that fact and find ways to better debug experiences.</p><p><a href="https://www.encyclopedia.com/computing/dictionaries-thesauruses-pictures-and-press-releases/debugging"><em>Encyclopedia.com</em></a><em> </em>defines debugging as</p><blockquote>“The identification and removal of localized implementation errors — or bugs — from a program or system.”</blockquote><p>So the first step is to identify the errors. This is why we have debuggers and thankfully Python ecosystem has a vast number of debugger alternatives. In this article I’ll explain you fundamental debugging tools for Python and new ways to debug your Python applications in production with the comfort of your PyCharm instance.</p><h3>A Sea Full of Debugging Solutions</h3><p>There are plenty of solutions for debugging Python applications. Below I’ve listed a few that I’ve found remarkable.</p><h4><strong>Good ol’ print()</strong></h4><p>It wouldn’t be fair to publish this article without paying homage to our old friend, print(). It has been a puppy love for all of us and it is by far the easiest one to start with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*MRs6_QaEf2AsyAvWGV6h0Q.png" /></figure><p>Sadly, when code gets complicated over time, print() falls short as we need a more sophisticated arsenal to find the root cause of production bugs.</p><p>Check out the article below to learn more about its drawbacks:</p><p><a href="https://medium.com/analytics-vidhya/are-you-writing-print-statements-to-debug-your-python-code-690e6ba098e9">Are you writing print() statements to debug your Python code?</a></p><h4><strong>pdb</strong></h4><p>Python comes with its own debugger called pdb that allows you to start a debugging session with an interactive console to inspect your code while it runs. Furthermore, it also allows you to add a breakpoint to your code and inspect stack frames on the go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*IfaGL0xAif0lY52NPsHOaQ.png" /></figure><p>In addition to the points above, pdb is easily extendable as is implemented as a class in the standard Python library.</p><p>In short, pdb is powerful and easy to use, especially for small to medium-sized projects. One major drawback of using it in production is that you need to edit your code every time you want to debug your application, which in the end will require a redeploy and restart of your application.</p><p>Below you can find extra information about pdb:</p><ul><li><a href="https://medium.com/pragmatic-programmers/investigating-with-pdb-breakpoints-d75b4127223b">Investigating with pdb Breakpoints</a></li><li><a href="https://realpython.com/python-debugging-pdb/">Python Debugging With Pdb - Real Python</a></li></ul><h4>IDE Debuggers</h4><p>Many IDEs like Visual Studio Code &amp; PyCharm offer ways to visually debug your Python applications. They provide an easier and more efficient way of debugging</p><p>Debugging using IDE’s default debugger is usually the go-to way at the early stage of projects. They are more than enough for daily debugging with the only drawback of lacking real-time data.</p><p>Since traditional debuggers work with the code in your local, they require you to reproduce the buggy scenarios locally. For such scenarios where you can’t reproduce, need real-time data, and debug a remote application remote debugging is the way to go.</p><h4>PyCharm Remote Debugging</h4><p>Remote debugging is one of PyCharm’s most powerful features that enable IDE to connect running instances on remote servers. This lets you put breakpoints to your running applications just like you do in a local system.</p><p><a href="https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html#prereqs">Remote Debugging with PyCharm | PyCharm</a></p><p>PyCharm Remote Debugging and other IDE-provided remote debugging alternatives are great to collect data from remote applications but they require additional setup and can be a major source of lag when used in production.</p><p>Read more :</p><p><a href="https://www.runsidekick.com/blog/the-ultimate-guide-to-live-debugging">Sidekick Blog | The Ultimate Guide to Live Debugging</a></p><p>For cases when you want to collect stack and exception data and add new logs on-demand to your production &amp; pre-production applications live application debuggers are here to help.</p><p>Live application debuggers offer a smoother and more lightweight debugging experience that enables you to collect data from running applications without compromising performance.</p><p>One of those live application debuggers is Sidekick. It is open-source and in addition to having traditional features like adding logpoints and putting breakpoints it is packed with extra features like stack collection when an exception occurs and integrations to ingest collected data to targets you desire like Elastic and Loki.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VlYYC5vGdPnntNlVktWvkg.png" /></figure><h4>PyCharm Sidekick Plugin</h4><p>Sidekick PyCharm plugin brings live debugging features to PyCharm making remote debugging hassle-free and lightweight. Enabling developers to debug their Python applications remotely from the comfort of their IDE. Unlike PyCharm remote debugging it is easier to setup, brings near zero overhead, and comes with extra features.</p><blockquote>Sidekick brings simplicity of print() to production debugging using PyCharm</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zksKkfFDsdnn-H18.gif" /></figure><p>Sidekick’s features include:</p><p><strong>Tracepoints</strong></p><p>A tracepoint is basically a non-breaking remote breakpoint. Tracepoints differ from ordinary breakpoints in two ways:</p><ul><li>First, it doesn’t pause the code execution but just takes a screenshot of the variables when the code hits that line.</li><li>Second, it’s integrated with Thundra’s distributed technology enabling the connection between several tracepoints in the same transaction.</li></ul><p><strong>Logpoints</strong></p><p>Logpoints are points that you can add to your running application, just like Tracepoints, for adding logs dynamically.</p><p>Since you can add and remove your logs at any time, getting the log wherever and whenever you need it becomes a walk in the park!</p><p><strong>Exception Stack Collection</strong></p><p>With Sidekick Python agent’s latest update, developers can now activate automatic error stack collection and start collecting exception call stacks from their running applications without stopping them.</p><p>Simply we can describe this new feature as an always-on tracepoint that is looking out for uncaught exceptions.</p><p>Read on:</p><p><a href="https://medium.com/runsidekick/capturing-exception-call-stacks-from-running-node-js-applications-d9cd81407593">Capturing Exception Call Stacks from Node.js Applications</a></p><p><strong>Data Redaction</strong></p><p>Sidekick agents let you define custom redaction functions that run every time before sending any data to Sidekick. This way you get full control over your data.</p><p>You can find the Sidekick PyCharm plugin here:</p><p><a href="https://plugins.jetbrains.com/plugin/20031-sidekick">Sidekick - IntelliJ IDEs Plugin | Marketplace</a></p><p>Sidekick does everything above and more while adding near-zero overhead to your applications. No redeploy and restart needed to start collecting new data. This makes it a perfect tool for a production environment, a true sidekick that you can trust.</p><p>One more thing…</p><p><strong>It is open-source!</strong></p><p>Sidekick and its agents bring a lot to the table and promise to improve the developer experience by far. Furthermore, they are completely open-source so you can both learn how they work, expand them, and self-host your own instances.</p><p>You can check out the repository here:</p><p><a href="https://github.com/runsidekick/sidekick">GitHub - runsidekick/sidekick: Free and open-source live application debugger. Like chrome dev tools but for your backend</a></p><h4>Worth mentioning:</h4><p><strong>Visual Studio Code</strong></p><p>Visual Studio code also has great modern debugging tools and we will further discuss it in another article. In addition to its tools Visual Studio Code also has a Sidekick plugin itself, which you can find here: <a href="https://marketplace.visualstudio.com/items?itemName=Sidekick.sidekick-debugger">https://marketplace.visualstudio.com/items?itemName=Sidekick.sidekick-debugger</a></p><p>tldr;</p><blockquote>Whether your apps are running on a single EC2, docker or a large k8s cluster, Sidekick allows you to collect realtime stacks, logs and errors from your running applications. All without leaving your favourite IDE.</blockquote><blockquote><a href="https://www.runsidekick.com/">Visit our site to learn more.</a></blockquote><p>You can get in touch with us through <a href="https://twitter.com/RunSidekick"><strong>Twitter</strong></a>, and join our <a href="https://www.runsidekick.com/discord-invitation"><strong>Discord community</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98125b685195" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sidekick’s Live Debugging Agents are now open source]]></title>
            <link>https://kaya.medium.com/sidekicks-live-debugging-agents-are-now-open-source-e369c04d36a2?source=rss-7e063e1c2a64------2</link>
            <guid isPermaLink="false">https://medium.com/p/e369c04d36a2</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[barış kaya]]></dc:creator>
            <pubDate>Wed, 28 Sep 2022 14:04:36 GMT</pubDate>
            <atom:updated>2022-09-28T14:04:36.527Z</atom:updated>
            <content:encoded><![CDATA[<h4>We have open-sourced Sidekick Live Debugger a few weeks ago and now we have open-sourced all our agents too.</h4><p>Modern software development tools and practices help us developers deliver more powerful solutions better and faster than ever. Netflix, Spotify etc. all are examples for those powerful solutions we have today. Sadly not everything in the garden is lovely. With great power comes great complexity and that complexity results in loss of money and developer productivity.</p><p>As it is said in <a href="https://www.infoworld.com/article/3639050/complexity-is-killing-software-developers.html">InfoWorld</a></p><blockquote>“The growing complexity of modern software systems is slowly killing software developers.”</blockquote><p>Growing complexity of software development results in many issues like;</p><ul><li>Monitoring and logging everything is a high cost in many aspects.</li><li>Solving production issues via old school techniques such as mocking the managed services and simulating the cloud environments locally is grueling.</li><li>Collecting dynamic data from running applications is hard</li><li>Adding new logs and redeploying apps takes time</li><li>Developer on-boarding is hard for complex systems</li><li>Logging everything or using APMs create so much unnecessary data</li></ul><p>Fortunately, we have <a href="https://www.runsidekick.com/">Sidekick</a> to solve all the issues above. Sidekick is a live application debugger that lets you troubleshoot your applications while they keep on running.</p><p>Check out Sidekick Open-source repository to learn more:</p><p><a href="https://github.com/runsidekick/sidekick">GitHub - runsidekick/sidekick: Free and open-source live application debugger. Like chrome dev tools but for your backend</a></p><p>The advantage of Sidekick over classical APM solutions is that, Sidekick</p><ul><li>can debug and trace any location (your code base or 3rd party dependency) in your application, not just the external (DB, API, etc …) calls like APM solutions</li><li>has zero overhead when you don’t have any tracepoint or log point but APMs have always</li><li>doesn’t produce too much garbage data because it collects data only at the certain points you specified as long as that point (tracepoint/logpoint) is active</li></ul><h4>Inside Sidekick</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ysjvbeH6XfYIB9JU" /></figure><p>Sidekick consists of 3 layers;</p><ul><li>Broker</li><li>Agents</li><li>Clients</li></ul><p>The broker is the central unit of Sidekick. It controls all the data flow between clients and agents.</p><p>Agents are the layer where Sidekick actions meet with your applications. Agents deployed with your software lets you collect snapshot data and generate dynamic logs without modifying your code. Agents get orders from clients and start listening to the targeted lines with given properties. Then whenever your code hits a logpoint or a tracepoint, agents collect stack &amp; log data and send them to the clients via the broker. Currently, we have agents for Java, Python &amp; Node.js runtimes.</p><p>Clients let you interact with the agents.</p><h3>Sidekick and its agents are now open source!</h3><p>Sidekick Open Source is here to allow self-hosting and make live debugging more accessible. Built for everyone who needs extra information from their running applications.</p><p>After open-sourcing Sidekick repository we have received more than 1000 stars in just few days. This clearly shows that there is a real curiosity and demand about our live application debugger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tQkN9aYbOjNCtsMuthrTvQ.png" /></figure><p>By open-sourcing everything we have built we want to both share our knowledge, make self-hosting available, grow Sidekick with our communities contributions and show our users what we collect from their running applications.</p><p>Sidekick agents allow you to inject tracepoints (non-breaking breakpoints) and log points dynamically to capture call stack snapshots (with variables) and add log messages on the fly without code modification, re-build and re-deploy. So it helps you, your team, and your organization to reduce MTTR (Minimum Time to Repair/Resolve)</p><p>Connecting an agent to a production application has become mainstream but we wanted to achieve full transparency for our agents so that there will be no questions left unanswered. You can check all three agent of ours below:</p><h4>1 - Java agent</h4><p>Sidekick Java agent has nothing to do with JDWP (Java Debug Wire Protocol), as it doesn’t suspend the code execution, but hooks into code execution at the application layer by bytecode instrumentation.</p><p><a href="https://github.com/runsidekick/sidekick-agent-java">GitHub - runsidekick/sidekick-agent-java: Java agent for Sidekick open-source live application debugger</a></p><p><strong>Benchmarks</strong></p><ul><li><a href="https://medium.com/runsidekick/sidekick-blog-production-debuggers-2022-benchmark-results-part-1-ec173d0f8ccd">Production Debuggers — 2022 Benchmark Results</a></li></ul><h4>2 - Python agent</h4><p>Sidekick Python Agent makes use of <a href="https://github.com/GoogleCloudPlatform/cloud-debug-python">Google Python Cloud Debugger Agent’s</a> breakpoint implementations under the hood.</p><p><a href="https://github.com/runsidekick/sidekick-agent-python/">GitHub - runsidekick/sidekick-agent-python: Python agent for Sidekick open-source live application debugger</a></p><h4>3 - Node.js agent</h4><p>Sidekick Node.js agent makes use of V8’s inspector API.</p><p><a href="https://github.com/runsidekick/sidekick-agent-nodejs">GitHub - runsidekick/sidekick-agent-nodejs: Nodejs agent for Sidekick open-source live application debugger</a></p><p>You can get extra information from our documentation: <a href="https://docs.runsidekick.com/installation/installing-agents">https://docs.runsidekick.com/installation/installing-agents</a></p><h3>TLDR;</h3><blockquote><em>Sidekick broker and all agents are all open-source, allowing you to self-host and get to know more about live debugging. You can now check out our repositories and learn more about how Sidekick works and what it collects.</em></blockquote><p>Sidekick is now open-source and brings almost no overhead to your applications. Visit runsidekick.com to meet your new live application debugger.</p><p><a href="https://www.runsidekick.com/">Sidekick | Open Source Live Application Debugger</a></p><p>Please let us know your invaluable ideas because they will guide us on our path to discovering the future of application observability. You can get in touch with us through <a href="https://twitter.com/RunSidekick"><strong>Twitter</strong></a>, and join our <a href="https://www.runsidekick.com/discord-invitation"><strong>Discord community</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e369c04d36a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Capturing Exception Call Stacks from Node.js Applications]]></title>
            <link>https://kaya.medium.com/capturing-exception-call-stacks-from-running-node-js-applications-d9cd81407593?source=rss-7e063e1c2a64------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9cd81407593</guid>
            <category><![CDATA[error]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[error-handling]]></category>
            <category><![CDATA[debugging]]></category>
            <dc:creator><![CDATA[barış kaya]]></dc:creator>
            <pubDate>Fri, 23 Sep 2022 10:33:56 GMT</pubDate>
            <atom:updated>2022-09-23T11:07:25.531Z</atom:updated>
            <content:encoded><![CDATA[<h4>Sidekick allows you to collect stacks as errors happen, without needing for putting a tracepoint beforehand</h4><p>Sidekick is an <a href="https://github.com/runsidekick/sidekick">open-source</a> live application debugger that lets you troubleshoot your applications while they keep on running. It is like Chrome DevTools for your and built for everyone who needs extra information from their applications.</p><p><a href="https://github.com/runsidekick/sidekick">GitHub - runsidekick/sidekick: Free and open-source live application debugger. Like chrome dev tools but for your backend</a></p><p>Sidekick Actions ( <a href="https://docs.runsidekick.com/sidekick-actions/logpoint">logpoint </a>and <a href="https://docs.runsidekick.com/sidekick-actions/tracepoint">tracepoint </a>) are giving developers dynamic logging and live debugging abilities. They are most powerful when you know exactly where you should put them.</p><p>Our recent user research shows that when uncaught exceptions occur, proactively putting tracepoints for stack collection might not be enough as in some rare cases, putting a tracepoint after spotting a problem can’t help until the error happens again. That’s why we have developed;</p><blockquote>Automatic error stack collection</blockquote><p>With our <a href="https://github.com/runsidekick/sidekick-agent-nodejs">Node agent</a>’s latest update, developers can now activate automatic error stack collection and start collecting exception call stacks from their running applications without stopping them.</p><p>Simply we can describe this new feature as an always on tracepoint that is looking out for uncaught exceptions. Of course this can bring an overhead but we see a great potential to lower MTTR’s for exceptions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2PXiKHPv4KOsYcUmQDc3A.png" /></figure><h4>See it in action:</h4><p>We will be using our quickstart repository from a previous tutorial.</p><p><a href="https://github.com/boroskoyo/sidekick-nodejs-quickstart">GitHub - boroskoyo/sidekick-nodejs-quickstart: Quick start example for Sidekick.</a></p><p>The only difference will the 2 new parameters we are adding at the initialization. errorCollectionEnabled is set true to enable the basic error collection and the latest parameter is set true to enable detailed frame capturing in case of errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KWO1O5G_veldY6xZHjewIQ.png" /><figcaption>app/app.js</figcaption></figure><p>To show an example of uncaught exception we will add</p><blockquote>throw new Error(‘yet another error’);</blockquote><p>at the end of the function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*9aOF2kgIKx9nvC6qngV3Zg.png" /><figcaption>routes/speakers.js</figcaption></figure><p>Now then we run our application and visit the speakers page it will throw an exception. It is time to collect information about this exception. For this tutorial we will be using our Sidekick Node.js Client and visualisation of collected errors will soon come to our Web IDE and extensions. You can get our client from:</p><p><a href="https://www.npmjs.com/package/@runsidekick/sidekick-client">@runsidekick/sidekick-client</a></p><p>Below you can see a simple script to collect error snapshots and print them to console. Sidekick client allows you to customize your ingest functions, check out our <a href="https://docs.runsidekick.com/sidekick-recipes">recipes page</a> for examples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OhXXde3TLsR5TNE5ypEamA.png" /><figcaption>client script</figcaption></figure><p>We have started both our main application and client script. After visiting the speakers page our app throw an exception and the agent sent every single detail about it to our broker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQ5s2Lw7KhDr5WU0PED-7Q.png" /></figure><p>To keep the tutorial simple we have printed everyting to console but to make thing a little bit prettier we will use JSON visualization tool called JSON Crack to understand our collected data. In your own cases sending the collected data to your elastic instances or any other alternative would be much better way to use this data.</p><p><a href="https://jsoncrack.com/">JSON Crack | Online JSON Viewer - Transform your data into interactive graphs</a></p><p>Below is the initial node of our collected data. You can see when and where it happened and other details like the error message, file name, line no etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-fl3D_EDkIcRqZRsURO6LA.png" /></figure><p>Since we have enabled frame capture we were able to collect every information in our scope. So as you can see below in case of an error, rather than trying to reproduce it or looking out for clues we are now able get everything we need automatically.</p><blockquote>All thanks to Sidekick error stack collection</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O3p1OCxFtYXIftQqxRWpHQ.png" /></figure><p>If you would like to ingest this collected data to your desired target you can use Sidekick’s integrations (Logz.io, Slack, Sumo Logic etc.) or see the examples below to learn how you can build your own.</p><ul><li><a href="https://github.com/boroskoyo/sidekick-elastic">GitHub - boroskoyo/sidekick-elastic: send your collected tracepoint &amp; logpoint events to Elasticsearch</a></li><li><a href="https://github.com/boroskoyo/sidekick-loki">GitHub - boroskoyo/sidekick-loki: Ingest your Sidekick logs &amp; snapshots to Loki. Thanks to winston &amp; winston-loki</a></li></ul><h4><strong>TLDR;</strong></h4><blockquote>With Sidekick <a href="https://github.com/runsidekick/sidekick-agent-nodejs">Node agent</a>’s latest update, developers can now activate automatic error stack collection and start collecting exception call stacks from their running applications without stopping them. A great addition to Sidekick Actions that will help you boost your developer productivity even more.</blockquote><p>Sidekick is open-source and brings almost no overhead to your applications. Visit runsidekick.com to meet your new live application debugger.</p><p><a href="https://www.runsidekick.com/">Sidekick | Open Source Live Application Debugger</a></p><p>Please let us know your invaluable ideas because they will guide us on our path to discovering the future of application observability. You can get in touch with us through <a href="https://twitter.com/RunSidekick"><strong>Twitter</strong></a>, and join our <a href="https://www.runsidekick.com/discord-invitation"><strong>Discord community</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9cd81407593" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Achieving Rule-based observability using Sidekick  and Camunda]]></title>
            <link>https://kaya.medium.com/achieving-rule-based-observability-using-sidekick-and-camunda-8bb6483c7730?source=rss-7e063e1c2a64------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bb6483c7730</guid>
            <category><![CDATA[camunda]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[debug]]></category>
            <category><![CDATA[sidekick]]></category>
            <dc:creator><![CDATA[barış kaya]]></dc:creator>
            <pubDate>Wed, 07 Sep 2022 10:50:30 GMT</pubDate>
            <atom:updated>2022-12-01T12:08:20.741Z</atom:updated>
            <content:encoded><![CDATA[<h3>Achieving Rule-based observability using Sidekick and Camunda</h3><h4>Collect what you need, only when you need it based on your rules!</h4><p>Sidekick is an <a href="https://github.com/runsidekick/sidekick"><strong>open source</strong></a> live application debugger that comes with many built-in features to make data collection both easier and more efficient. Collecting snapshots and generating logs from running applications are powerful for learning how your code works as long as you collect the data you need.</p><p>Logging everything is not a smart move as you can find yourself searching in a log pile full of mostly unnecessary logs in a very short time. Similar case applies for the snapshots &amp; traces. That is why we have included conditional data generation in Sidekick. Combined with hit and time limits, they allow you to collect only what you need, leaving a graveyard of useless data behind.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*INVpGx7tgVElW9Ed2WP2Ew.png" /></figure><p>In addition to our out-of-the-box conditional limitation features, Sidekick’s API’s and clients let you to bring your own rules which leads to a relatively new approach to observability, a rule based one. With this approach we will be able to put tracepoints when rules met and start collecting data automatically based on rule engine’s output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YdKzGohp-YEGyPh2CVKb6g.gif" /></figure><h4>Rule Engines</h4><p>There are plenty of different rule engines &amp; workflow automation tools that we can use for such a scenario. A few can be listed as:</p><ul><li><a href="https://camunda.com/">The Universal Process Orchestrator | Camunda</a></li><li><a href="https://www.drools.org/">Drools - Business Rules Management System (Java™, Open Source)</a></li><li><a href="https://www.npmjs.com/package/json-rules-engine">json-rules-engine</a></li><li><a href="https://www.npmjs.com/package/node-rules">node-rules</a></li></ul><p>We will be using Camunda for this example for broader use cases as Camunda is more than a rule engine it is a universal process orchestrator. For a usage example of Camunda you can check out:</p><p><a href="https://blog.bernd-ruecker.com/use-camunda-without-touching-java-and-get-an-easy-to-use-rest-based-orchestration-and-workflow-7bdf25ac198e">Use Camunda as an easy-to-use REST-based orchestration and workflow engine (without touching Java)</a></p><h4>Using Sidekick with Camunda</h4><p>Camunda provides external task clients that allow developers to implement tasks to run when a workflow hits to the related step. We will be using Node.js client but cases below can also be achieved with different clients of Camunda and Sidekick’s upcoming Python &amp; Java clients.</p><p><a href="https://www.npmjs.com/package/camunda-external-task-client-js">camunda-external-task-client-js</a></p><p>Example task method:</p><pre>// Subscribe to the topic: &#39;topicName&#39;<br>client.subscribe(&quot;topicName&quot;, async function({ task, taskService }) {<br>  // Put your business logic<br>  // Complete the task<br>  await taskService.complete(task);<br>});</pre><p><a href="https://www.npmjs.com/package/@runsidekick/sidekick-client">@runsidekick/sidekick-client</a></p><p>Task method with Sidekick Put tracepoint event:</p><pre>// Subscribe to the topic: &#39;topicName&#39;<br>client.subscribe(&quot;topicName&quot;, async function({ task, taskService }) { </pre><pre>   const params= {<br>      applicationFilters: [<br>          {<br>            name: &quot;Demo application&quot;,<br>            version: &quot;v1.0&quot;,<br>            stage: &quot;prod&quot;<br>          }<br>        ],<br>      fileName: &quot;gitlab.com/repos/...&quot;,<br>      lineNo: 23,<br>      expireSecs: -1,<br>      expireCount: -1,<br>      enableTracing: true,<br>      persist: true<br>  }<br>  apiClient.putTracepoints(params);<br>  await taskService.complete(task);<br>});</pre><h3>Example use cases</h3><h4>Case 1 — Activating Tracepoints based on error scenarios</h4><p>Camunda’s DMN engine provides us ability to define rules in an excel like interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NiZSUANcysBNOJwAzeNO6A.png" /><figcaption>Sidekick DMN</figcaption></figure><p>As you can observe at the DMN above we can define where we put tracepoints when a certain type of error occurs.</p><p>Triggering workflows with error types makes a great use case as it enables us to automatically start collecting extra information based on different cases. Enabling different tracepoints at once is especially useful for spotting state changes.</p><blockquote>Note: In addition to this use case Sidekick Node.js agent has ability to automatically capture error stacks, without any tracepoint. check out: <a href="https://www.npmjs.com/package/@runsidekick/sidekick-agent-nodejs">https://www.npmjs.com/package/@runsidekick/sidekick-agent-nodejs</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PtgBVnGlhUHaG54ioHJrYg.png" /><figcaption>Example Sidekick BPMN</figcaption></figure><h4>Case 2 —Putting Tracepoints on workflow errors</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4GYMm9hF1EzWD4R2MPzIsw.png" /><figcaption><a href="https://blog.bernd-ruecker.com/use-camunda-without-touching-java-and-get-an-easy-to-use-rest-based-orchestration-and-workflow-7bdf25ac198e">image from: https://blog.bernd-ruecker.com/use-camunda-without-touching-java-and-get-an-easy-to-use-rest-based-orchestration-and-workflow-7bdf25ac198e</a></figcaption></figure><p>Camunda comes with an error handling mechanism that lets you run actions in cases of errors. In addition to Sidekick client, we can also attach Sidekick agents to task services to observe their state changes and debug them effectively.</p><h4>Case 3 — Activating Tracepoints on certain events</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RsCLAeQS9H4dOBF0J1MPPw.png" /></figure><p>Last but not least, Sidekick Actions bring more than debugging to the table. They are also great tools to understand how the system works. Especially for the cases like understanding why and how edge cases occur or understanding when does a certain step is reached.</p><p>We have briefly explained how Sidekick can be used with Camunda to achieve rule based observability, for better understanding systems, having a smoother debug experience and lowering monitoring costs with conditional data collection. The 3 cases we have explained are just the tip of the iceberg and there is a lot more to discover here.</p><p>Please let us know your invaluable ideas because they will guide us on our path to discovering the future of application observability. You can get in touch with us through <a href="https://twitter.com/RunSidekick"><strong>Twitter</strong></a>, and join our <a href="https://www.runsidekick.com/discord-invitation"><strong>Discord community</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bb6483c7730" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sidekick Open Source Live Debugger : Embed Sidekick features to your applications]]></title>
            <link>https://kaya.medium.com/sidekick-open-source-live-debugger-embed-sidekick-features-to-your-applications-1bacf083da5c?source=rss-7e063e1c2a64------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bacf083da5c</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[express]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[node-js-tutorial]]></category>
            <dc:creator><![CDATA[barış kaya]]></dc:creator>
            <pubDate>Wed, 31 Aug 2022 09:08:59 GMT</pubDate>
            <atom:updated>2022-08-31T09:08:59.702Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sidekick Open Source Live Debugger : Embed Sidekick features to your applications</h3><h4>Control Sidekick agents from a React &amp; Express application</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XwXOLaa32JGApvsQBlsKAQ.png" /></figure><h3>What is Sidekick?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*SauxO0Hs_fS8G4Ex" /></figure><p>Sidekick is an open-source live application debugger that lets you troubleshoot your applications while they keep on running.</p><p>Check out Sidekick Open-source repo to learn more:</p><p><a href="https://github.com/runsidekick/sidekick">GitHub - runsidekick/sidekick: Free and open-source live application debugger. Like chrome dev tools but for your backend</a></p><p>Sidekick agents can be controlled both via a UI from Sidekick Web IDE, Visual Studio Code &amp; IntelliJ IDEA and via a headless approach from REST API &amp; Node.js Client. Sidekick REST API and Node.js client allows developers to control Sidekick actions from their own solutions.</p><h3>About the example</h3><p>We have prepared an example project to show how you can develop a custom application to control your Sidekick agents using Sidekick Node.js Client.</p><p>This example consists of 2 parts. First part is a standard web application that we will live debug and the second one is our custom Sidekick control app. Both parts are connected to a self hosted version of Sidekick.</p><p>Sidekick Control App that we have build has 2 main features.</p><h4>1 - Putting tracepoints</h4><p>In the React applicaion you can find 2 buttons that let you put tracepoints to specified locations.</p><p>Tracepoints are added via making a call to express server that is running behind. The express server uses the Sidekick client’s putTracepoints function to make an api call to Sidekick REST API.</p><pre>apiClient.putTracepoints(params);</pre><h4>2 - Listening events</h4><p>Sidekick client’s onTrigger feature is used to listed activities from Sidekick broker.</p><pre>onTrigger(clientInfo);</pre><p>We have implemented a custom ingest function for tracepoints to send them to the react application using socket.io.</p><pre>function ingestFunc(index) { <br>    return async function (data) { <br>        console.log(data); <br>        io.to(“stack-room”).emit(“stack”, data); <br>    };<br>}</pre><p>get extra info about Sidekick Node.js client here: <a href="https://www.npmjs.com/package/@runsidekick/sidekick-client">Sidekick Node.js Client</a></p><h4>Built With</h4><ul><li>React</li><li><a href="https://expressjs.com/">Express</a></li><li><a href="https://github.com/runsidekick/sidekick">Socket.io</a></li><li><a href="https://www.electronjs.org/">Electron</a></li><li><a href="https://www.npmjs.com/package/@runsidekick/sidekick-client">Sidekick Node.js Client</a></li><li><a href="https://www.npmjs.com/package/react-json-view">react-json-view</a></li></ul><h3>Getting Started</h3><h4>Prerequisites</h4><ul><li><a href="https://github.com/runsidekick/sidekick">Sidekick</a></li></ul><pre>Make sure Sidekick broker is running. (check main Sidekick repo) <br>If you have changed the default settings, update token and port values in this tutorial accordingly.</pre><p>Check out our <a href="https://medium.com/p/efc0845a2288">Quick Start Guide</a>.</p><h4>Part-1 | Employee System (Main App)</h4><pre># Clone Employee System repository<br>git clone <a href="https://github.com/boroskoyo/sidekick-example-employee-management-system">https://github.com/boroskoyo/sidekick-example-employee-management-system</a><br># Go into the repository<br>cd sidekick-example-employee-management-system<br># Install dependencies<br>npm i --legacy-peer-deps<br># Run the app<br>npm run start</pre><p>UI will start running at <a href="http://localhost:3000/">http://localhost:3000</a> and backend will be using the port 8081</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lTvLqDifKDoUBIP_.png" /></figure><ul><li>server/index.js - This is where we include our Sidekick agent. You can edit the agent settings according to your setup and needs.</li></ul><p>Agent settings can be seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/0*9PM0Zyky6QGzgjfV.png" /><figcaption>Agent Settings</figcaption></figure><h4>Part-2 | Control Application</h4><p>This is the application we have built to control our Sidekick agent.</p><pre># Clone control app repository<br>git clone https://github.com/boroskoyo/sidekick-electron-quick-start<br># Go into the repository<br>cd sidekick-electron-quick-start<br># Install dependencies<br>npm i --legacy-peer-deps<br># Run the app<br>npm run dev-app</pre><p>You can also run the browser version — http://localhost:5173</p><pre># You can also run the browser version - http://localhost:5173/<br>npm run dev</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/0*6IdYgAXncboghsUt.png" /><figcaption>Sidekick Explorer UI</figcaption></figure><ul><li>server.js - Contains the main functions for putting Tracepoint.</li><li>params - This is where we prepare our params for Sidekick API requests for putting tracepoints.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/265/0*IAk_yhimcHWr83Yb.png" /><figcaption>parameters for tracepoint</figcaption></figure><ul><li>filename - Filname paramters consists of git address of the file and the commit hash.</li></ul><h3>Usage</h3><p>After running all applications. Go to <a href="http://localhost:3000/">http://localhost:3000</a> and check out the employee app. Then use the put tracepoint buttons on the Electron app to put tracepoints on the running application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oFCod2gdTHdjcN4kPqNszA.gif" /><figcaption>Sidekick control app in action</figcaption></figure><h4>Tracepoint Locations:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0eHmKlJ19ZZpzmGHYnQAtw.png" /><figcaption>Get Employees (Line 62)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*SCQ_B2qqgQtuSxRE.png" /><figcaption>Delete Employees (Line 202)</figcaption></figure><ul><li>Visit the home page and capture stack related to employee list endpoint.</li><li>Delete an employee to collect related data.</li><li>Check out Electron app to see your collected events.</li></ul><p>You can than further edit those apps to explore Sidekick Client’s features.</p><h3>Conclusion</h3><p>As you can see above, Sidekick clients allow developers to easily use collected data and control Sidekick Actions from third party applications. We are planning to implement Sidekick control plugins for different dashboards and platforms, share your desired targets and feature requests via issues and discussions.</p><p>Please let us know your invaluable ideas because they will guide us on our path to discovering the future of application observability. You can get in touch with us through <a href="https://github.com/runsidekick/sidekick"><strong>Github</strong></a><a href="https://twitter.com/RunSidekick"><strong>, Twitter</strong></a>, and join our <a href="https://www.runsidekick.com/discord-invitation"><strong>Discord community</strong></a>.</p><p>If you liked this article and learn more about <a href="https://www.runsidekick.com/"><strong>Sidekick</strong></a> you can check out our <a href="https://docs.runsidekick.com/">docs </a>and start using it right away!</p><p>Repo related to this article:</p><p><a href="https://github.com/boroskoyo/sidekick-electron-quick-start">GitHub - boroskoyo/sidekick-electron-quick-start: an example app to show how you can control your agents from a React application:</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bacf083da5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>