Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2137

Include JRuby version in app metadata

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.13.0.beta1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Hide
      When running under JRuby, app metadata for platform now includes JRuby version as the first component and JVM version as a later component. On both MRI and JRuby the format of platform data was changed to prefix Ruby version with "Ruby" and JRuby version with "JRuby". Ruby compatibility version when running on JRuby is now prefixed with "like Ruby".
      Show
      When running under JRuby, app metadata for platform now includes JRuby version as the first component and JVM version as a later component. On both MRI and JRuby the format of platform data was changed to prefix Ruby version with "Ruby" and JRuby version with "JRuby". Ruby compatibility version when running on JRuby is now prefixed with "like Ruby".
    • 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
      

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: