diff --git a/source/plugins/ruby/ApplicationInsightsUtility.rb b/source/plugins/ruby/ApplicationInsightsUtility.rb index 74d08c1e68..31f9503cdf 100644 --- a/source/plugins/ruby/ApplicationInsightsUtility.rb +++ b/source/plugins/ruby/ApplicationInsightsUtility.rb @@ -139,12 +139,12 @@ def initializeUtility() def getContainerRuntimeInfo() begin - # Not doing this for windows since docker is being deprecated soon and we dont want to bring in the socket dependency. - if !@@isWindows.nil? && @@isWindows == false - containerRuntime = ENV[@@EnvContainerRuntime] - if !containerRuntime.nil? && !containerRuntime.empty? - # DockerVersion field holds either containerRuntime for non-docker or Dockerversion if its docker - @@CustomProperties["DockerVersion"] = containerRuntime + containerRuntime = ENV[@@EnvContainerRuntime] + if !containerRuntime.nil? && !containerRuntime.empty? + # DockerVersion field holds either containerRuntime for non-docker or Dockerversion if its docker + @@CustomProperties["DockerVersion"] = containerRuntime + # Not doing this for windows since docker is being deprecated soon and we dont want to bring in the socket dependency. + if !@@isWindows.nil? && @@isWindows == false if containerRuntime.casecmp("docker") == 0 dockerInfo = DockerApiClient.dockerInfo if (!dockerInfo.nil? && !dockerInfo.empty?)