{"id":9761,"date":"2015-07-30T02:32:00","date_gmt":"2015-07-30T02:32:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2015\/07\/30\/getting-application-insights-counters-with-cloud-based-load-testing\/"},"modified":"2022-08-02T00:44:09","modified_gmt":"2022-08-02T08:44:09","slug":"getting-application-insights-counters-with-cloud-based-load-testing","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/getting-application-insights-counters-with-cloud-based-load-testing\/","title":{"rendered":"Getting Application Insights counters with Cloud-based Load Testing"},"content":{"rendered":"<p><a href=\"https:\/\/www.visualstudio.com\/get-started\/test\/load-test-your-app-vs\">Cloud-based Load Testing with Visual Studio Online<\/a>\u00a0helps to identify the application performance issues under a certain user load. You can configure the load test with <a href=\"https:\/\/azure.microsoft.com\/en-in\/documentation\/articles\/app-insights-overview\/\">Application Insights<\/a> counters in addition to the load test counters. This will enable you to compare and contrast both load test counters and server counters and figure out the performance issues more intuitively.<\/p>\n<p>This blog will tell how to enable the collection of Application Insights counters along with the Load Test counters while doing load test run using Cloud-based Load Testing with Visual Studio Online.<\/p>\n<ol start=\"1\">\n<li>\n    <a href=\"https:\/\/azure.microsoft.com\/en-in\/documentation\/articles\/app-insights-overview\/\">Enable Application Insights<\/a> for your service or application if not already done.\n  <\/li>\n<li>\n    Enable Azure Active Directory for your Visual Studio Online (VSO) account as explained <a href=\"https:\/\/www.visualstudio.com\/en-us\/get-started\/setup\/manage-organization-access-for-your-account-vs\">here<\/a> if not already done.\n  <\/li>\n<li>\n    Link the VSO Account with your Azure subscription as said <a href=\"https:\/\/www.visualstudio.com\/en-us\/get-started\/setup\/set-up-billing-for-your-account-vs\">here<\/a> if not already done.\n  <\/li>\n<li>\n    Sign in to you VSO Account from the browser. This is to refresh the Azure Resources Manager access token. The Azure Resource Manager access token in valid for 12 hours in the context of the VSO.\n  <\/li>\n<\/ol>\n<ol start=\"1\">\n<li>\n    If you have already signed in then make sure you sign out and sign in again.\n  <\/li>\n<\/ol>\n<ul>\n<li>Configure\u00a0Application Insights counters in load test<\/li>\n<\/ul>\n<ol start=\"1\">\n<li>\n    Go to: RunSettings -> Get Performance Data from Application Insights\n  <\/li>\n<li>\n    <a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/1033.3757_Runsettings.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/1033.3757_Runsettings.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\n  <\/li>\n<\/ol>\n<ul>\n<li>Select the desired Application Insights counters and click\u00a0&#8220;OK&#8221; in the below dialog box. The counters shown here are the\u00a0one shown in the <a href=\"https:\/\/azure.microsoft.com\/en-in\/documentation\/articles\/app-insights-metrics-explorer\/\">metric explorer of Application Insights<\/a>.<\/li>\n<\/ul>\n<ol start=\"1\">\n<li>\n    \u00a0<a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/6303.2287_counterSelection.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/6303.2287_counterSelection.png\" alt=\"\" border=\"0\" \/><\/a>\n  <\/li>\n<\/ol>\n<ul>\n<li>Once the above steps are done, you will be able to see the selected counters under the &#8220;Applications&#8221; node as shown below<\/li>\n<\/ul>\n<ol start=\"1\">\n<li>\n    \u00a0<a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/0160.applicationsInSettings.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/0160.applicationsInSettings.png\" alt=\"\" width=\"380\" height=\"439\" border=\"0\" \/><\/a>\n  <\/li>\n<\/ol>\n<ul>\n<li>Queue\u00a0the load test run and while the run is in progress you will be able to see\u00a0the Application Insights counters on the &#8220;Application&#8221; tab as shown below<\/li>\n<\/ul>\n<ol start=\"1\">\n<li>\n    \u00a0\u00a0<a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/8546.results.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/8546.results.png\" alt=\"\" border=\"0\" \/><\/a>\n  <\/li>\n<\/ol>\n<ul>\n<li>The Application Insights counter samples have &#8220;One minute&#8221; as the\u00a0sampling rate irrespective of your load test counter&#8217;s sampling rate\u00a0configured.\u00a0\n<strong>FAQ:<\/strong><\/li>\n<\/ul>\n<p>\u00a0<strong>1&#46;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Will the old Visual Studio Online version of Application Insights work with Load testing with Visual studio Online?<\/strong><\/p>\n<p>Please reach out to <a href=\"&#109;&#x61;&#105;&#x6c;&#116;&#x6f;:&#118;&#x73;&#111;&#x6c;&#111;&#x61;d&#116;&#x65;&#115;&#x74;&#64;&#x6d;i&#99;&#x72;&#111;&#x73;&#111;&#x66;t&#46;&#x63;&#111;&#x6d;\">&#118;&#x73;&#111;&#x6c;&#111;&#x61;d&#116;&#x65;&#115;&#x74;&#64;&#x6d;i&#99;&#x72;&#111;&#x73;&#111;&#x66;t&#46;&#x63;&#111;&#x6d;<\/a> if you need this scenario.<\/p>\n<p><strong>2&#46; Why am I\u00a0getting &#8220;Unable to connect to Visual Studio Online due to network failure&#8221; while trying to add applications via &#8220;RunSettings -> Get Performance Data from Application Insights&#8221;?<\/strong><\/p>\n<p><span><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/3731.Authoring20Error.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/3731.Authoring20Error.png\" alt=\"\" width=\"415\" height=\"156\" border=\"0\" \/><\/a><\/span><\/p>\n<p><span>This can happen due to two reasons:<\/span><\/p>\n<p><span>\u00a01) No Applications are configured to push analytics data to &#8220;Application Insights&#8221;, please refer to <a title=\"this\" href=\"https:\/\/azure.microsoft.com\/en-in\/documentation\/articles\/app-insights-get-started\/\">this<\/a> to get started with Application Insights. And please confirm that you can see the applications under &#8220;Application Insights&#8221;\u00a0in the azure portal as shown below.<\/span><\/p>\n<p><span><a href=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/7652.AzureAI.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/07\/7652.AzureAI.png\" alt=\"\" border=\"0\" \/><\/a><\/span><\/p>\n<p><span>\u00a02) The Azure Resources Manager access token has expired. The Azure Resource Manager access token in valid for 12 hours in the context of the VSO.<\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Corrective Action : If you have already signed in to your\u00a0&#8220;Visual Studio Online&#8221; account (<a href=\"https:\/\/ranjanarprodtrail.visualstudio.com\/\">https:\/\/*****.visualstudio.com\/<\/a>)\u00a0then make sure you sign out and sign in again.<\/p>\n<p>3) The Azure Active directory is not enabled for your Visual Studio Online(VSO) account.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Corrective Action : Enable Azure Active Directory for your Visual Studio Online (VSO) account as explained <a href=\"https:\/\/www.visualstudio.com\/en-us\/get-started\/setup\/manage-organization-access-for-your-account-vs\">here<\/a><\/p>\n<p>If none of the above works please reach out to <a href=\"&#109;&#x61;&#105;&#x6c;&#116;&#x6f;:&#118;&#x73;&#111;&#x6c;&#111;&#x61;d&#116;&#x65;&#115;&#x74;&#64;&#x6d;i&#99;&#x72;&#111;&#x73;&#111;&#x66;t&#46;&#x63;&#111;&#x6d;\">&#118;&#x73;&#111;&#x6c;&#111;&#x61;d&#116;&#x65;&#115;&#x74;&#64;&#x6d;i&#99;&#x72;&#111;&#x73;&#111;&#x66;t&#46;&#x63;&#111;&#x6d;<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cloud-based Load Testing with Visual Studio Online\u00a0helps to identify the application performance issues under a certain user load. You can configure the load test with Application Insights counters in addition to the load test counters. This will enable you to compare and contrast both load test counters and server counters and figure out the performance [&hellip;]<\/p>\n","protected":false},"author":175,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[224,1,252],"tags":[],"class_list":["post-9761","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-devops","category-testing"],"acf":[],"blog_post_summary":"<p>Cloud-based Load Testing with Visual Studio Online\u00a0helps to identify the application performance issues under a certain user load. You can configure the load test with Application Insights counters in addition to the load test counters. This will enable you to compare and contrast both load test counters and server counters and figure out the performance [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/9761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/175"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=9761"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/9761\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=9761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=9761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=9761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}