examples/advanced_host/README.md
This template provisions a Rails 8 application that demonstrates a production-style integration:
/operations/source_monitor/source_monitor/metrics endpointrbenv exec rails new source_monitor_advanced \
--main \
--css=tailwind \
--database=postgresql \
-m ../path/to/examples/advanced_host/template.rb
Create a .env or export the following before running bin/dev:
DATABASE_URL – Point at your Postgres instance.REDIS_URL – Required for the Redis Action Cable adapter.SOURCE_MONITOR_METRICS_USER / SOURCE_MONITOR_METRICS_PASS – Credentials for the metrics endpoint.The template appends the following entries to Procfile.dev:
web – Rails server.worker – bin/rails solid_queue:start.jobs – bin/jobs --recurring_schedule_file=config/recurring.yml.When deploying to production, run each process in its own container or dyno.
Review config/initializers/source_monitor_instrumentation.rb to see how ActiveSupport notifications can be bridged into your logging stack. Adjust the regex or payload filtering to match the events you care about.
The template mounts Mission Control Jobs at /mission_control. Authenticate it the same way you authenticate the SourceMonitor dashboard (Devise, OmniAuth, etc.).
cd source_monitor_advancedbin/setupbin/devVisit:
Review config/initializers/source_monitor.rb for additional knobs (HTTP retries, retention, custom processors) once you're ready to harden for production workloads.