{"id":58103,"date":"2025-09-15T10:05:00","date_gmt":"2025-09-15T17:05:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=58103"},"modified":"2025-09-15T15:48:59","modified_gmt":"2025-09-15T22:48:59","slug":"application-insights-code-optimizations","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/application-insights-code-optimizations\/","title":{"rendered":"Application Insights Code Optimizations for .NET Apps"},"content":{"rendered":"<p>As engineers we know how frustrating it can be to chase and fix performance issues without clear guidance. That\u2019s why we built <a href=\"https:\/\/aka.ms\/CodeOptimizations\">Application Insights Code Optimizations<\/a> \u2014 to give you actionable insights, reduce the guesswork, and help you focus on what you do best: building great software.<\/p>\n<h2>What does it do?<\/h2>\n<p>To help you tackle performance issues with confidence, the Application Insights Code Optimizations surfaces meaningful insights without the need for deep-dive profiling sessions. It helps you reduce toil for optimizing performance of your .NET applications by automatically analyzing runtime profiler traces, identifying CPU and memory bottlenecks, and delivering actionable, code-level recommendations through GitHub Copilot. <img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/09\/CodeOptimization.jpg\" alt=\"screenshot of Code Optimization Suggestion\" \/><\/p>\n<h2>How Does It Work?<\/h2>\n<p>Code Optimizations integrates directly with the Application Insights .NET Profiler. It meticulously analyzes trace data from your running application to identify inefficiencies. These insights are then presented as clear, actionable recommendations within the Azure portal.<\/p>\n<h2>Seamless Integration with Your Workflow<\/h2>\n<p>You can seamlessly integrate these recommendations into your development process. Track them as work items in Azure DevOps or your preferred tool and leverage the power of GitHub Copilot in Visual Studio or Visual Studio Code to get code-level suggestions grounded in the trace analysis.<\/p>\n<p>Furthermore, Code Optimizations extends into the GitHub Copilot coding agent, allowing you to explore various performance-tested remediation options and collaborate on the best fix. It&#8217;s no surprise that over half of our users are assigning the GitHub Issues generated from these insights directly to the GitHub Copilot coding agent to accelerate their optimization tasks. <img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/09\/assign-to-github-copilot-toggle-on.png\" alt=\"screenshot of Create Work Item\" \/><\/p>\n<p>Try it now! Check out our full <a href=\"https:\/\/aka.ms\/CodeOptimizations\/docs\">documentation<\/a><\/p>\n<h2>See It in Action<\/h2>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=UUYAbRze3UA\">Check out the Azure Friday session with Scott Hanselman<\/a> to see a live demonstration of Code Optimizations and witness how it can transform your performance tuning process.<\/p>\n<h2>What\u2019s New?<\/h2>\n<p>We are excited to share some new enhancements:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/azure\/azure-monitor\/optimization-insights\/code-optimizations-profiler-overview?source=recommendations\">Blocking Insights<\/a>: Code Optimizations now identifies issues that prevent threads from executing\u2014such as synchronous operations within asynchronous workflows. Previously, recommendations were limited to threads that were actively running; now, you it can help you identify problems affecting threads that are blocked or waiting.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/azure\/azure-monitor\/optimization-insights\/code-optimizations-github-copilot\">Direct GitHub Copilot Assignment<\/a>: You can now assign GitHub issues to the GitHub Copilot coding agent directly from the code optimizations page. We&#8217;ve also enabled this from the Application Insights Failures crash analysis blade <a href=\"https:\/\/learn.microsoft.com\/azure\/azure-monitor\/snapshot-debugger\/snapshot-debugger-data\">(snapshot debugger)<\/a>, streamlining your debugging and optimization workflow.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/Azure\/azuremonitor-opentelemetry-profiler-net\">OpenTelemetry Support (Preview)<\/a>: As OpenTelemetry adoption grows, we are thrilled to announce that you can now use the .NET Profiler for OpenTelemetry (Preview). This allows you to gain valuable performance insights without needing to add any additional SDKs to your applications, simplifying your instrumentation strategy. <img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/09\/open-telemetry-references.jpg\" alt=\"Open Telemetry References\" \/><\/p>\n<\/li>\n<\/ul>\n<h2>Get Started Today<\/h2>\n<p>Ready to take your application performance to the next level? Getting started with Code Optimizations is easy. If you are already using Application Insights, you just enable the .NET Profiler for your application. For new applications, you can enable it as part of the Application Insights setup.<\/p>\n<h2>Let\u2019s Build This Together<\/h2>\n<p>We built Code Optimizations to make performance tuning easier, faster, and more impactful for developers like you. But this is just the beginning. I\u2019d love to hear how it\u2019s working for you, what\u2019s missing, and what you\u2019d like to see next. Your feedback helps us shape the future of this experience\u2014so don\u2019t hold back! Drop us a note at <a href=\"https:\/\/aka.ms\/CodeOptimizations\/Feedback\">https:\/\/aka.ms\/CodeOptimizations\/Feedback<\/a> and let\u2019s keep making this better, together.<\/p>\n<h2>Call to Action<\/h2>\n<ul>\n<li>\n<p><a href=\"https:\/\/aka.ms\/CodeOptimizations\/docs\">Enable Code Optimizations<\/a> in your Application Insights resource today and start receiving performance recommendations.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=UUYAbRze3UA\">Watch our Azure Friday session to learn more.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/aka.ms\/CodeOptimizations\/Feedback\">Join the conversation and provide your feedback<\/a> to help shape the future of this service.<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Learn how Application Insights Code Optimizations helps .NET developers identify performance bottlenecks and get AI-powered recommendations through GitHub Copilot integration.<\/p>\n","protected":false},"author":197562,"featured_media":58140,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,7781,327,3009],"tags":[7498,8064,7869,8063,8059],"class_list":["post-58103","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-ai","category-azure","category-performance","tag-application-insights","tag-azure-monitor","tag-github-copilot","tag-performance-optimization","tag-profiling"],"acf":[],"blog_post_summary":"<p>Learn how Application Insights Code Optimizations helps .NET developers identify performance bottlenecks and get AI-powered recommendations through GitHub Copilot integration.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/58103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/197562"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=58103"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/58103\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58140"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=58103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=58103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=58103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}