File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
newrelic-agent/src/main/java/com/newrelic/agent/language Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ private void detectJava() {
92
92
93
93
private void detectScala3 (ClassLoader systemClassLoader ) {
94
94
try {
95
- //scala3-library removed all methods referencing the version number, so we just capture the major version
95
+ //scala3-library removed all methods referencing the version 3 number, so we only capture the major version
96
96
//by checking for a class introduced in the scala 3 API.
97
97
Class <?> aClass = Class .forName ("scala.deriving.Mirror" , true , systemClassLoader );
98
98
if (aClass != null ) {
@@ -107,7 +107,8 @@ private void detectScala3(ClassLoader systemClassLoader) {
107
107
108
108
private void detectScala (ClassLoader systemClassLoader ) {
109
109
try {
110
- // Scala has a static versionNumberString method that can be invoked to get the version number
110
+ // Scala has a static versionNumberString method that can be invoked to get the version number.
111
+ // A scala 3 app will also capture this metric, because scala 3 includes the scala 2.13 library.
111
112
Class <?> aClass = Class .forName (SCALA_VERSION_CLASS , true , systemClassLoader );
112
113
if (aClass != null ) {
113
114
String version = (String ) aClass .getMethod (SCALA_VERSION_METHOD ).invoke (null );
You can’t perform that action at this time.
0 commit comments