Problem:
The UI in rubyRuntimePlatform/Dashboard/Content.js uses the formatter: kiloBytesTwoDecimalPlaces for displaying the value in plugins.rubyRuntimePlatform.dashboard.memory.
Which essentially treats the unit of the value as a Kilobyte, This has not changed in a long long time.
In the ruby-sensor however in c49f7dfe191f1cc3c0278042ddb76cbc5ff31181 things have changed,
the rss value propagation has been separated on the two mainly supported platforms darwin and linux .
The orignal code previous to c49f7dfe191f1cc3c0278042ddb76cbc5ff31181 was converting
the rss value to kibibyte on the top level, before sending the metrics.
After c49f7dfe191f1cc3c0278042ddb76cbc5ff31181, for host agents (non-serverless),
the rss for darwin is read in byte and then immediately converted to kibibyte, but for linux the rss is read in number of pages, and converted to bytes instead of kibibyte with the 4096 byte page constant.
And the top level conversion was removed.
This left the MacOS reporting in kibibyte while Linux reporting in bytes.
This commit restores the original top level conversion, and makes sure that before the conversion everything is in bytes on both OS, this aligns with ruby_process.rb , which is still used for serverless, and also keeps the values in bytes and only converts them before sending.
Problem: The UI in
rubyRuntimePlatform/Dashboard/Content.js
uses theformatter: kiloBytesTwoDecimalPlaces
for displaying the value inplugins.rubyRuntimePlatform.dashboard.memory
.Which essentially treats the unit of the value as a
Kilobyte
, This has not changed in a long long time. In the ruby-sensor however inc49f7dfe191f1cc3c0278042ddb76cbc5ff31181
things have changed, the rss value propagation has been separated on the two mainly supported platformsdarwin
andlinux
. The orignal code previous toc49f7dfe191f1cc3c0278042ddb76cbc5ff31181
was converting therss
value tokibibyte
on the top level, before sending the metrics.After
c49f7dfe191f1cc3c0278042ddb76cbc5ff31181
, for host agents (non-serverless), therss
fordarwin
is read inbyte
and then immediately converted tokibibyte
, but forlinux
therss
is read innumber of pages
, and converted tobytes
instead ofkibibyte
with the4096
byte page constant. And the top level conversion was removed. This left the MacOS reporting inkibibyte
while Linux reporting inbytes
.This commit restores the original top level conversion, and makes sure that before the conversion everything is in
bytes
on both OS, this aligns withruby_process.rb
, which is still used for serverless, and also keeps the values inbytes
and only converts them before sending.