puma-cloudwatch icon indicating copy to clipboard operation
puma-cloudwatch copied to clipboard

Add `busy_threads` statistic

Open rnhurt opened this issue 1 year ago • 0 comments

This pull request introduces the busy_threads metric to the Puma Cloudwatch integration, updates the metric parsing and sending logic, and adjusts the corresponding tests to accommodate the new metric.

Metrics Addition:

  • Added busy_threads to the list of metrics in lib/puma_cloudwatch/metrics/parser.rb.
  • Updated the example structure in the call method documentation to include busy_threads in lib/puma_cloudwatch/metrics/parser.rb and lib/puma_cloudwatch/metrics/sender.rb. [1] [2]

Documentation Update:

  • Added a description for the busy_threads metric in the README.md file.

Test Adjustments:

  • Modified spec/puma_cloudwatch/metrics/fetcher_spec.rb to use a mock socket and updated the test description.
  • Updated spec/puma_cloudwatch/metrics/parser_spec.rb to include busy_threads in the test data and expectations. [1] [2] [3] [4] [5]
  • Adjusted spec/puma_cloudwatch/metrics/sender_spec.rb to validate the inclusion of busy_threads in the metric data and its storage resolution. [1] [2] [3] [4]

rnhurt avatar Apr 10 '25 17:04 rnhurt