Add /metrics endpoint with Prometheus metrics gem #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone -- discovered during observability gap audit. Prerequisite for ServiceMonitor and dashboard issues to be useful.
Repo
ldraney/landscaping-assistantUser Story
As an operator
I want the Rails app to expose a /metrics endpoint with standard request metrics
So that Prometheus can scrape application-level data for dashboards and alerts
Context
The Rails app has no Prometheus metrics integration. The Gemfile contains zero metrics-related gems. Without a /metrics endpoint, even a correctly configured ServiceMonitor has nothing to scrape. This is the foundational piece that all other observability work depends on. Two main options:
prometheus_exporter(separate metrics server on port 9394) oryabeda-rails+yabeda-prometheus(serves on the main app port at /metrics). The yabeda approach is simpler for ServiceMonitor configuration since it uses the same port.File Targets
Files the agent should modify or create:
Gemfile-- add metrics gem(s)config/initializers/metrics.rborconfig/initializers/yabeda.rb-- configure metrics collectionconfig/routes.rb-- mount metrics endpoint if needed (yabeda-prometheus auto-mounts)Files the agent should NOT touch:
.woodpecker.yaml-- CI config is a separate concernAcceptance Criteria
/metricsendpoint returns Prometheus text format (content-typetext/plain)/metricsreturns HTTP 200 in both development and productionTest Expectations
curl localhost:3000/metricsreturns Prometheus-format metricsbundle exec rails runner "puts 'metrics configured'" RAILS_ENV=developmentConstraints
yabeda-rails+yabeda-prometheusfor simpler ServiceMonitor port alignmentprometheus_exporter, document the port difference for ServiceMonitor configurationyabeda-puma-pluginfor thread/worker saturation metrics if using PumaChecklist
Related
project-landscaping-assistant-- project this affectsldraney referenced this issue2026-05-25 03:09:01 +00:00