-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
-
Minor Change
When running on JRuby, the driver sends the following app metadata as visible from the server:
2020-02-20T16:24:17.539+0000 I NETWORK [conn51] received client metadata from 127.0.0.1:60906 conn51: { driver: { name: "mongo-ruby-driver", version: "2.11.0.rc0" }, os: { type: "linux", name: "linux", architecture: "x86_64" }, platform: "2.5.7, java, java1.8" }
The "2.5.7" is the MRI compatibility level for the JRuby interpreter. The actual JRuby version is missing.
The metadata should include actual JRuby version first and Ruby compatibility version later.
Also we can include the JVM version when running on JRuby.
New format
MRI:
{:isMaster=>1, :compression=>[], :client=>{"driver"=>{"name"=>"mongo-ruby-driver", "version"=>"2.12.1"}, "os"=>{"type"=>"linux", "name"=>"linux-gnu", "architecture"=>"x86_64"}, "platform"=>"Ruby 2.7.1, x86_64-linux, x86_64-pc-linux-gnu"}} Ruby 2.7.1, x86_64-linux, x86_64-pc-linux-gnu
JRuby:
{:isMaster=>1, :compression=>[], :client=>{"driver"=>{"name"=>"mongo-ruby-driver", "version"=>"2.12.1"}, "os"=>{"type"=>"linux", "name"=>"linux", "architecture"=>"x86_64"}, "platform"=>"JRuby 9.2.11.0, like Ruby 2.5.7, java, JVM 11.0.7, java1.8"}} JRuby 9.2.11.0, like Ruby 2.5.7, java, JVM 11.0.7, java1.8