diff --git a/.changesets/track-the-operating-system-release-distro-in-the-diagnose-report.md b/.changesets/track-the-operating-system-release-distro-in-the-diagnose-report.md new file mode 100644 index 000000000..2c02bd674 --- /dev/null +++ b/.changesets/track-the-operating-system-release-distro-in-the-diagnose-report.md @@ -0,0 +1,6 @@ +--- +bump: "patch" +type: "add" +--- + +Track the Operating System release/distro in the diagnose report. This helps us with debugging what exact version of Linux an app is running on, for example. diff --git a/lib/appsignal/cli/diagnose.rb b/lib/appsignal/cli/diagnose.rb index 4f521f29b..4dd4f776d 100644 --- a/lib/appsignal/cli/diagnose.rb +++ b/lib/appsignal/cli/diagnose.rb @@ -443,6 +443,9 @@ def host_information save :os, os puts_value "Operating System", os_label + distribution_file = "/etc/os-release" + save :os_distribution, File.exist?(distribution_file) ? File.read(distribution_file) : "" + language_version = "#{rbconfig["RUBY_PROGRAM_VERSION"]}-p#{rbconfig["PATCHLEVEL"]}" save :language_version, language_version puts_format "Ruby version", language_version diff --git a/spec/integration/diagnose b/spec/integration/diagnose index f4d7ac67f..4fa6c98c0 160000 --- a/spec/integration/diagnose +++ b/spec/integration/diagnose @@ -1 +1 @@ -Subproject commit f4d7ac67f4a537ff321efb0ae2ee189f9b6784e3 +Subproject commit 4fa6c98c0c77da1972cd9286b3465fd50710d3e7 diff --git a/spec/lib/appsignal/cli/diagnose_spec.rb b/spec/lib/appsignal/cli/diagnose_spec.rb index 8be24e996..f609835c5 100644 --- a/spec/lib/appsignal/cli/diagnose_spec.rb +++ b/spec/lib/appsignal/cli/diagnose_spec.rb @@ -636,9 +636,12 @@ def dont_accept_prompt_to_send_diagnostics_report run host_report = received_report["host"] host_report.delete("running_in_container") # Tested elsewhere + distribution_file = "/etc/os-release" + os_distribution = File.exist?(distribution_file) ? File.read(distribution_file) : "" expect(host_report).to eq( "architecture" => rbconfig["host_cpu"], "os" => rbconfig["host_os"], + "os_distribution" => os_distribution, "language_version" => language_version, "heroku" => false, "root" => false