![]() In the end, the goal of the tools is to allow you to write better and more robust applications. If you work a lot with VS Code, then the AI integration can transform your workflow and the way you approach troubleshooting and performance monitoring. This means that there's a close correlation between our code and AI making troubleshooting a much better experience. What's even better is that little lightbulb on the right links directly to the live AI instance, so if we click on it, the Azure portal opens in the browser and we're taken directly into the AI instance that's associated with our application. This was a nice touch by the team that developed the extension because as soon as we click it, we are presented with a nice summary page inside VS Code Hovering over it, you'll notice that CodeLens AI information is clickable. As soon as we have everything wired up, CodeLens can tell us what's going on with our code straight away. If there's one AI feature that's definitely invaluable and can make the whole experience of developing and troubleshooting inside VS Code a pleasure is the AI-CodeLens integration. Add your instrumentation key or use the APPLICATIONINSIGHTSKEY environment variable on your production machine to start collecting data.Īi.setup( || '1412e627-aaaa-1111-abcd-7cda91f92d2d').start() Add the necessary AI bootstrap code to app.js. ![]() At the end of the provisioning, you'll end up with the following changes to your project Create a new AI instance with custom settingsĭepending on our selection, the instrumentation may be instant (for existing AI instances) or it may take a while as we spin up a new resource group and resources to accommodate our application.Create a new AI instance with the default settings.With a subscription selected, we're presented with a few options: Once logged in, we are prompted to select a subscription. Login (if you're not logged in to Azure already).As the name implies, we need to select the appropriate options from the command palette: The next step is to add AI to the project. Next, we need to type Application Insights to bring the available command options. We then need to open the application in VS Code and bring up the command palette from the menu or by using the keyboard shortcut: Ctr+Shift+P (Windows) or Command+Shift+P (Mac). To get started with the application, we need to open the command line and bootstrap a new app using the following steps: NET to showcase the effort the team has put in to make AI onboarding as smooth and painless as possible. I also wanted to explicitly shy away from. Remember that AI works with many different languages and frameworks. In VS Code, go to the Extensions tab and search for Application InsightsĪdd Application Insights to an application.įor this example, I'm going to use a vanilla node.js Express application to showcase how easy it is to add the AI to it. To be able to work with AI, you'll need to add the AI Extension. In the meantime, back to the task at hand, i.e integrating AI with VS Code. If you're interested, let me know in the comments. I believe that a separate blog post is needed to explain why you should be using AI. Proactive improvements with AI and Machine Learning.Regardless of whether you're running on the cloud or on-premises, AI can light up your application in many interesting ways and give you a unique insight on areas such as: ![]() If you're not using AI for monitoring your apps (any app, any code) then you're missing out big time. I don't know how I've missed this but today I found out that ( " target="_blank) (VS Code) provides excellent integration with ( " target="_blank). Posted in Azure, logging, VS Code, Monitoring, AppInsights ![]() Visual Studio Code integration with Azure Application Insights 20 June 2017 ![]()
0 Comments
Leave a Reply. |