Recommended Architecture
Set Up Push-Based Collection
1
Deploy a metrics collector
Deploy a separate App in the same Environment to run Telegraf or another collector that can receive Prometheus-formatted metrics.
2
Configure the collector input
Configure Telegraf with the Prometheus listener input, such as
[[inputs.prometheus_listener]], so it can receive metrics pushed by your app Containers.3
Configure the collector output
Configure the output plugin for your monitoring backend, such as
[[outputs.datadog]] for Datadog.4
Push metrics from each app Container
Update your application to send its local Prometheus metrics endpoint to the collector on a regular interval.
Ruby Example
This example reads metrics from a local Prometheus endpoint and posts them to a Telegraf collector:prometheus_exporter gem can help collect and format metrics before you push them to your collector.

