Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add barnes gem (needed to report ruby runtime metrics to heroku) #2452

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

eddierubeiz
Copy link
Contributor

@eddierubeiz eddierubeiz commented Dec 4, 2023

Ref #2449

Ref #2446

This PR adds the barnes gem, which reports Ruby runtime metrics to Heroku, where we can monitor them at e.g.

Note: to turn on ruby runtime metrics:

heroku labs:enable "runtime-heroku-metrics"
heroku buildpacks:add -i 1 heroku/metrics

After these are run and this PR is merged and deployed, you will see three more time series graphs on the Metrics tab for the app in Heroku's admin interface. (e.g. https://dashboard.heroku.com/apps/scihist-digicoll-staging/metrics/web), namely

  • Ruby: Heap Objects
  • Ruby: Puma Pool Usage
  • Ruby: Free Memory Slots

https://devcenter.heroku.com/articles/language-runtime-metrics-ruby

@eddierubeiz eddierubeiz changed the title 💣 [Experimental - do not merge] [WIP] adding barnes Add barnes gem (needed to report ruby runtime metrics to heroku) Dec 4, 2023
@eddierubeiz eddierubeiz marked this pull request as ready for review December 4, 2023 22:37
@jrochkind
Copy link
Contributor

Hmm. config/puma.rb isn’t actually the file we use on heroku! Please also add to config/heroku_puma.rb — I’m surprised we got metrics at all this way, wonder if maybe they aren’t reliable!

Perhaps we should add a big comment warning to config/puma.rb since we are doing something a bit odd here (maybe we shoudln't be and should just use config/puma.rb on heroku -- but I didn't want to run multiple puma workers in dev and test etc!)

@jrochkind
Copy link
Contributor

thank you for url to heroku docs next to barnes before_fork line, love it!

@jrochkind jrochkind merged commit e6fbcee into master Dec 5, 2023
1 check passed
@jrochkind jrochkind deleted the runtime_ruby_metrics branch December 5, 2023 16:45
@jrochkind
Copy link
Contributor

The proper specific ticket ref for this PR was #2446, not the general RAM ticket. Fixed in description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants