Merge 58173176-new-relic-3.1.1 to master

[#58173176]
Refactor complex method

[#57311364]
Add examples other than Tomcat

[#59910222]