%3CLINGO-SUB%20id%3D%22lingo-sub-1195320%22%20slang%3D%22en-US%22%3ESend%20your%20JMeter%20test%20results%20to%20Azure%20Application%20Insights%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1195320%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20blog%20post%20explains%20how%20to%20use%20the%20recently%20published%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fadrianmo%2Fjmeter-backend-azure%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Backend%20Listener%3C%2FA%3E%20for%20Apache%20JMeter%20to%20send%20your%20test%20result%20metrics%20to%20your%20Azure%20Application%20Insights%20instance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWith%20the%20release%20of%20%3CA%20href%3D%22https%3A%2F%2Fjmeter.apache.org%2Fchanges_history.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EJMeter%203.2%3C%2FA%3E%2C%20the%20Apache%20team%20introduced%20a%20new%20%3CEM%3E%3CA%20href%3D%22https%3A%2F%2Fjmeter.apache.org%2Fusermanual%2Fcomponent_reference.html%23Backend_Listener%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EBackendListener%3C%2FA%3E%3C%2FEM%3E%20interface%20that%20allows%20you%20to%20build%20your%20own%20listeners%20and%20asynchronously%20push%20test%20result%20metrics%20to%20a%20backend%20of%20your%20choice.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20Application%20Insights%20integration%20leverages%20the%20JMeter%20Backend%20Listener%20interface%20by%20implementing%20an%20%3CEM%3EAzureBackendListenerClient%3C%2FEM%3E.%20This%20implementation%20makes%20use%20of%20the%20telemetry%20client%20available%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FApplicationInsights-Java%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EApplication%20Insights%20SDK%20for%20Java%3C%2FA%3E%20to%20send%20metrics%20to%20Azure.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1407975909%22%20id%3D%22toc-hId--1407975909%22%3EStep-by-step%20with%20the%20Azure%20Backend%20Listener%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20section%20shows%20you%20how%20to%20push%20your%20test%20results%20metrics%20to%20Application%20Insights.%20The%20configuration%20steps%20use%20the%20JMeter%20UI%2C%20but%20you%20can%20also%20do%20this%20via%20the%20command%20line.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--717414435%22%20id%3D%22toc-hId--717414435%22%3E1.%20Create%20an%20Application%20Insights%20instance%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20first%20step%20is%20to%20create%20an%20Application%20Insights%20instance%20from%20the%20portal.%20Take%20note%20of%20the%20instrumentation%20key%2C%20which%20you%20need%20to%20use%20later%20on%20to%20tell%20the%20backend%20listener%20where%20to%20push%20the%20metrics.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1770098398%22%20id%3D%22toc-hId-1770098398%22%3E2.%20Install%20Java%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EJMeter%20is%20a%20Java%20application%2C%20so%20you%20must%20install%20the%20Java%20Virtual%20Machine%20before%20you%20install%20JMeter.%20You%20can%20check%20if%20Java%20is%20already%20installed%20in%20your%20system%20by%20opening%20a%20command%20line%20console%20and%20typing%20%3CEM%3Ejava%20-version%3C%2FEM%3E.%20For%20example%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EC%3A%5C%26gt%3B%20java%20-version%3CBR%20%2F%3Ejava%20version%20%221.8.0_241%22%3CBR%20%2F%3EJava(TM)%20SE%20Runtime%20Environment%20(build%201.8.0_241-b07)%3CBR%20%2F%3EJava%20HotSpot(TM)%2064-Bit%20Server%20VM%20(build%2025.241-b07%2C%20mixed%20mode)%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20get%20an%20output%20like%20the%20one%20above%2C%20Java%20is%20already%20present%20and%20you%20can%20proceed%20with%20JMeter%20installation.%20Otherwise%2C%20if%20you%20get%20a%20message%20like%20%3CEM%3E'java'%20is%20not%20recognized...%3C%2FEM%3E%2C%20you%20can%20download%20and%20install%20the%20latest%20Java%20SE%20Runtime%20Environment%208%20for%20your%20system.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--37356065%22%20id%3D%22toc-hId--37356065%22%3E3.%20Install%20JMeter%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20you%20can%20download%20the%20latest%20Apache%20JMeter%20binaries%20from%20the%20official%20site%20and%20uncompress%20it%20to%20a%20location%20of%20your%20choice.%3C%2FP%3E%0A%3CP%3ENavigate%20to%20the%20JMeter%20directory%20and%20make%20sure%20JMeter%20is%20able%20to%20start.%20To%20run%20JMeter%2C%20browse%20to%20the%20%3CEM%3Ebin%2F%3C%2FEM%3E%20directory%20and%20run%20%3CEM%3Ejmeter.bat%3C%2FEM%3E%20(if%20you%20are%20on%20Windows)%20or%20%3CEM%3Ejmeter.sh%3C%2FEM%3E%20(if%20you%20are%20on%20Linux).%20The%20JMeter%20Test%20Plan%20screen%20appears.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22jmeter.png%22%20style%3D%22width%3A%20848px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F173572i2A1CF606C8089C3E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22jmeter.png%22%20alt%3D%22JMeter%20UI%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJMeter%20UI%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1844810528%22%20id%3D%22toc-hId--1844810528%22%3E4.%20Install%20the%20plugin%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGo%20to%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fadrianmo%2Fjmeter-backend-azure%2Freleases%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGitHub%20releases%3C%2FA%3E%20for%20the%20Azure%20backend%20listener%20and%20download%20the%20JAR%20file%20for%20the%20latest%20release.%20The%20required%20JAR%20file%20has%20the%20%3CEM%3Ejmeter.backendlistener.azure-X.Y.Z.jar%3C%2FEM%3E%20format.%3C%2FP%3E%0A%3CP%3EMove%20the%20JAR%20file%20to%20the%20JMeter%20directory%20inside%20the%20%3CEM%3Elib%2Fext%2F%3C%2FEM%3E%20directories.%20Your%20%3CEM%3Eext%3C%2FEM%3E%20directory%20should%20look%20something%20like%20this%3A%3CBR%20%2F%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22libext.png%22%20style%3D%22width%3A%20825px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F173574i94376027D97B7FBD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22libext.png%22%20alt%3D%22JMeter's%20lib%2Fext%2F%20directory%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJMeter's%20lib%2Fext%2F%20directory%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EClose%20JMeter%20if%20it%20is%20running%20and%20open%20it%20again%20to%20reload%20the%20installed%20plugins.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-642702305%22%20id%3D%22toc-hId-642702305%22%3E5.%20Configure%20the%20plugin%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20have%20an%20existing%20JMeter%20test%20plan%20file%2C%20you%20can%20go%20ahead%20and%20load%20it.%20Otherwise%2C%20you%20can%20%3CA%20href%3D%22https%3A%2F%2Fgist.githubusercontent.com%2Fadrianmo%2F4aac91927e21bdf4135763c6e5d2ff6e%2Fraw%2F8c6694973b4c17eb1c99926186394c44f77dde5b%2Fsimple.jmx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Edownload%20a%20simple%20test%20plan%3C%2FA%3E%20to%20try%20the%20plugin.%20This%20test%20plan%20sends%20100%20HTTP%20requests%20to%20%3CEM%3E%3CA%20href%3D%22http%3A%2F%2Fbing.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fbing.com%3C%2FA%3E%3C%2FEM%3E%20from%2010%20threads%20over%20approximately%2060%20seconds%2C%20making%20a%20total%20of%201%2C000%20requests.%3C%2FP%3E%0A%3CP%3EOnce%20loaded%2C%20JMeter%20should%20look%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22testplan.png%22%20style%3D%22width%3A%20793px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F173595iA850A613FCCD3662%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22testplan.png%22%20alt%3D%22simple.jmx%20test%20plan%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Esimple.jmx%20test%20plan%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ETo%20make%20JMeter%20send%20test%20result%20metrics%20to%20your%20Azure%20Application%20Insights%20instance%2C%20in%20your%20Test%20Plan%2C%20right-click%20Thread%20%3CEM%3EGroup%20%26gt%3B%20Add%20%26gt%3B%20Listener%20%26gt%3B%20Backend%20Listener%3C%2FEM%3E%2C%20and%20choose%20%3CEM%3Eio.github.adrianmo.jmeter.backendlistener.azure.AzureBackendClient%3C%2FEM%3E%20from%20the%20Backend%20Listener%20implementation%20dropdown%20list.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThen%2C%20in%20the%20Parameters%20table%2C%20configure%20the%20following%20attributes.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3EAttribute%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3EDescription%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3ERequired%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CEM%3EinstrumentationKey%3C%2FEM%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3EThe%20Instrumentation%20Key%20of%20your%20Application%20Insights%20instance%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3EYes%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CEM%3EtestName%3C%2FEM%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3EName%20of%20the%20test.%20This%20value%20is%20used%20to%20differentiate%20metrics%20across%20test%20runs%20or%20plans%20in%20Application%20Insights%20and%20allow%20you%20to%20filter%20them.%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3EYes%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CEM%3EliveMetrics%3C%2FEM%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3EBoolean%20to%20indicate%20whether%20or%20not%20real-time%20metrics%20are%20enabled%20and%20available%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fapp%2Flive-stream%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ELive%20Metrics%20Stream%3C%2FA%3E.%20Defaults%20to%20%3CEM%3Etrue%3C%2FEM%3E.%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3EYes%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EExample%20of%20configuration%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22configuration.png%22%20style%3D%22width%3A%20767px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F173596iB137E8C56427618F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22configuration.png%22%20alt%3D%22Example%20of%20plugin%20configuration%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EExample%20of%20plugin%20configuration%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%20example%20sets%20the%20%3CEM%3EtestName%3C%2FEM%3E%20to%20%3CEM%3Esimple-test-1%20%3C%2FEM%3Eand%20will%20provide%20us%20with%20real-time%20metrics%20via%20Live%20Metrics%20Stream.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1164752158%22%20id%3D%22toc-hId--1164752158%22%3E6.%20Run%20your%20test%20plan%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20the%20configuration%20is%20in%20place%2C%20you%20can%20run%20your%20test%20plan.%20Click%20the%20play%2Fstart%20button%20to%20start%20the%20test%20plan.%20The%20Azure%20Backend%20Listener%20starts%20pushing%20metrics%2C%20which%20are%20collected%20in%20your%20Application%20Insights%20instance%20under%20the%20%3CEM%3Erequests%3C%2FEM%3E%20dimension%20and%20with%20the%20name%20%3CEM%3Esimple-test-1%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3ECheck%20the%20JMeter%20logs%20to%20make%20sure%20no%20error%20is%20thrown.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22logs.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F173597iDD521F1B4D9D1E86%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22logs.png%22%20alt%3D%22JMeter%20test%20logs%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJMeter%20test%20logs%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1322760675%22%20id%3D%22toc-hId-1322760675%22%3E7.%20Visualize%20test%20result%20metrics%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20approximately%20one%20minute%2C%20the%20test%20finishes%20and%20you%20can%20check%20to%20see%20if%20your%20metrics%20are%20available%20in%20Application%20Insights.%20In%20the%20Azure%20portal%2C%20go%20to%20your%20Application%20Insights%20instance%20and%20go%20to%20%3CEM%3EMonitoring%20%26gt%3B%20Logs%3C%2FEM%3E.%20Double-click%20the%20%3CEM%3Erequests%3C%2FEM%3E%20dimension%20to%20browse%20the%20metrics%20sent%20by%20JMeter.%20If%20you%20don%E2%80%99t%20see%20the%20metrics%2C%20wait%20a%20few%20more%20minutes%20until%20they%20appear.%20Make%20sure%20to%20also%20check%20the%20additional%20metrics%20available%20inside%20the%20%3CEM%3EcustomDimensions%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22metrics.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F173576iA4A47F53CAAB27A3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22metrics.png%22%20alt%3D%22Test%20metrics%20in%20Application%20Insights%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ETest%20metrics%20in%20Application%20Insights%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20create%20custom%20charts%20to%20visualize%20your%20metrics.%20For%20example%2C%20the%20following%20KQL%20query%20depicts%20the%20requests'%20duration%20during%20the%20test%20run.%20Make%20sure%20to%20adjust%20the%20time%20range%20to%20include%20your%20metrics.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Erequests%3CBR%20%2F%3E%7C%20where%20name%20%3D%3D%20'simple-test-1'%3CBR%20%2F%3E%7C%20summarize%20duration%20%3D%20avg(duration)%20by%20bin(timestamp%2C%201s)%3CBR%20%2F%3E%7C%20render%20timechart%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22appinsights.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F173573i21BE556598BCCD78%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22appinsights.png%22%20alt%3D%22Query%20and%20chart%20showing%20request%20duration%20of%20time%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EQuery%20and%20chart%20showing%20request%20duration%20of%20time%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAdditionally%2C%20if%20you%20enabled%20%3CEM%3EliveMetrics%3C%2FEM%3E%20in%20the%20configuration%2C%20you%20can%20watch%20your%20test%20performance%20in%20real-time%20in%20the%20Live%20Metrics%20Stream%20blade.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22livemetrics.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F173582iE5F83203352CCA10%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22livemetrics.png%22%20alt%3D%22Real-time%20test%20performance%20from%20Live%20Metrics%20Stream%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EReal-time%20test%20performance%20from%20Live%20Metrics%20Stream%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1312257571%22%20id%3D%22toc-hId-1312257571%22%3EFeedback%20and%20contributions%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20have%20experienced%20any%20issues%20during%20the%20setup%20or%20usage%20of%20the%20plugin%2C%20or%20have%20any%20ideas%20for%20future%20enhancements%2C%20please%20let%20us%20know%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fadrianmo%2Fjmeter-backend-azure%2Fissues%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eproject's%20GitHub%20issues%3C%2FA%3E%20section.%20We%20also%20encourage%20direct%20contributions%20to%20the%20project%20by%20forking%20and%20making%20pull%20requests.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1195320%22%20slang%3D%22en-US%22%3E%3CP%3ELearn%20how%20you%20can%20leverage%20the%20recently%20published%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fadrianmo%2Fjmeter-backend-azure%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Backend%20Listener%3C%2FA%3E%20to%20send%20your%26nbsp%3BApache%20JMeter%20test%20metrics%20to%20Azure%20Application%20Insights%20to%20analyze%20the%20results%20and%20see%20the%20test%20performance%20in%20real%20time.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Azure%20and%20JMeter.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F173676iAABD8FB32DC70FA9%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Azure%20and%20JMeter.png%22%20alt%3D%22Azure%20and%20JMeter.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1195320%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplications%20Insights%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

This blog post explains how to use the recently published Azure Backend Listener for Apache JMeter to send your test result metrics to your Azure Application Insights instance.

 

With the release of JMeter 3.2, the Apache team introduced a new BackendListener interface that allows you to build your own listeners and asynchronously push test result metrics to a backend of your choice.

 

This Application Insights integration leverages the JMeter Backend Listener interface by implementing an AzureBackendListenerClient. This implementation makes use of the telemetry client available in the Application Insights SDK for Java to send metrics to Azure.

 

Step-by-step with the Azure Backend Listener

 

This section shows you how to push your test results metrics to Application Insights. The configuration steps use the JMeter UI, but you can also do this via the command line.

 

1. Create an Application Insights instance

 

The first step is to create an Application Insights instance from the portal. Take note of the instrumentation key, which you need to use later on to tell the backend listener where to push the metrics.

 

2. Install Java

 

JMeter is a Java application, so you must install the Java Virtual Machine before you install JMeter. You can check if Java is already installed in your system by opening a command line console and typing java -version. For example:

 

C:\> java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)

 

If you get an output like the one above, Java is already present and you can proceed with JMeter installation. Otherwise, if you get a message like 'java' is not recognized..., you can download and install the latest Java SE Runtime Environment 8 for your system.

 

3. Install JMeter

 

Now you can download the latest Apache JMeter binaries from the official site and uncompress it to a location of your choice.

Navigate to the JMeter directory and make sure JMeter is able to start. To run JMeter, browse to the bin/ directory and run jmeter.bat (if you are on Windows) or jmeter.sh (if you are on Linux). The JMeter Test Plan screen appears.

 

JMeter UIJMeter UI

 

4. Install the plugin

 

Go to the GitHub releases for the Azure backend listener and download the JAR file for the latest release. The required JAR file has the jmeter.backendlistener.azure-X.Y.Z.jar format.

Move the JAR file to the JMeter directory inside the lib/ext/ directories. Your ext directory should look something like this:
 JMeter's lib/ext/ directoryJMeter's lib/ext/ directory

Close JMeter if it is running and open it again to reload the installed plugins.

 

5. Configure the plugin

 

If you have an existing JMeter test plan file, you can go ahead and load it. Otherwise, you can download a simple test plan to try the plugin. This test plan sends 100 HTTP requests to http://bing.com from 10 threads over approximately 60 seconds, making a total of 1,000 requests.

Once loaded, JMeter should look like this:

 

simple.jmx test plansimple.jmx test plan

To make JMeter send test result metrics to your Azure Application Insights instance, in your Test Plan, right-click Thread Group > Add > Listener > Backend Listener, and choose io.github.adrianmo.jmeter.backendlistener.azure.AzureBackendClient from the Backend Listener implementation dropdown list.

 

Then, in the Parameters table, configure the following attributes.

 

Attribute Description Required
instrumentationKey The Instrumentation Key of your Application Insights instance Yes
testName Name of the test. This value is used to differentiate metrics across test runs or plans in Application Insights and allow you to filter them. Yes
liveMetrics Boolean to indicate whether or not real-time metrics are enabled and available in the Live Metrics Stream. Defaults to true. Yes

 

Example of configuration:

 

Example of plugin configurationExample of plugin configuration

This example sets the testName to simple-test-1 and will provide us with real-time metrics via Live Metrics Stream.

 

6. Run your test plan

 

Once the configuration is in place, you can run your test plan. Click the play/start button to start the test plan. The Azure Backend Listener starts pushing metrics, which are collected in your Application Insights instance under the requests dimension and with the name simple-test-1.

Check the JMeter logs to make sure no error is thrown.

 

JMeter test logsJMeter test logs

 

7. Visualize test result metrics

 

After approximately one minute, the test finishes and you can check to see if your metrics are available in Application Insights. In the Azure portal, go to your Application Insights instance and go to Monitoring > Logs. Double-click the requests dimension to browse the metrics sent by JMeter. If you don’t see the metrics, wait a few more minutes until they appear. Make sure to also check the additional metrics available inside the customDimensions.

 

Test metrics in Application InsightsTest metrics in Application Insights

You can also create custom charts to visualize your metrics. For example, the following KQL query depicts the requests' duration during the test run. Make sure to adjust the time range to include your metrics.

 

requests
| where name == 'simple-test-1'
| summarize duration = avg(duration) by bin(timestamp, 1s)
| render timechart

 

Query and chart showing request duration of timeQuery and chart showing request duration of time

Additionally, if you enabled liveMetrics in the configuration, you can watch your test performance in real-time in the Live Metrics Stream blade.

 

Real-time test performance from Live Metrics StreamReal-time test performance from Live Metrics Stream

Feedback and contributions

 

If you have experienced any issues during the setup or usage of the plugin, or have any ideas for future enhancements, please let us know in the project's GitHub issues section. We also encourage direct contributions to the project by forking and making pull requests.