I have a complex product that runs like this.
Question 1: How do we config Prometheus to scrape metrics from the workers when there is no HTTP.
Question 2: If Q1 is not doable, is there a way that we can send all metrics from workers to parent and let the parent to export these metrics? How should this work? Is there existing Micrometer tools to send a whole registry to another process through TCP? Once the parent received the registry from worker, how does the parent merge it with its own metrics?
I tried to find some examples but everything online shows that each JVM should have its own HTTP endpoint for scraping.
How do we config Prometheus to scrape metrics from the workers when there is no HTTP.
Check out https://github.com/micrometer-metrics/prometheus-rsocket-proxy it has a server and a client component. You run the server in your infra and add the client to your app. The client connects to the server and sends metrics data to it. The Prometheus backend scrapes the server not the app (no HTTP needed).