newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
202 stars 144 forks source link

Capture source language for Scala 3 #2117

Open kanderson250 opened 3 weeks ago

kanderson250 commented 3 weeks ago

We generate a supportability metric showing a customer's source language and version. Currently for Scala, we detect the source language version from a method called versionNumberString. https://github.com/newrelic/newrelic-java-agent/blob/00f7b8d522535c23ff2a11dbd74bf61d6894f3c9/newrelic-agent/src/main/java/com/newrelic/agent/language/SourceLibraryDetector.java#L26

This is broken for Scala 3 because this method doesn't exist in the Scala 3 source. It appears to have been replaced by versionNumberOrString.

Modify the Source Library Detector to capture the source language version for Scala 3 as well as lower versions of Scala. Verify that the Supportability/SourceLanguage/* metric is generated for Scala 3 environments.

workato-integration[bot] commented 3 weeks ago

https://new-relic.atlassian.net/browse/NR-335744