gortiz opened a new pull request, #18786:
URL: https://github.com/apache/pinot/pull/18786

   ## Summary
   
   Adds a new `pinot-micrometer` metrics plugin 
(`pinot-plugins/pinot-metrics/pinot-micrometer`) implementing the existing 
metrics SPI (`PinotMetricsFactory` / `PinotMetricsRegistry`), as a step toward 
adopting [Micrometer](https://micrometer.io/) — the de-facto JVM metrics 
standard — without losing or renaming any existing Prometheus metric.
   
   The backend has **two config-toggled export legs**:
   
   - **JMX leg (default on):** a Dropwizard-backed store plus a 
Yammer-compatible JMX `ObjectName` factory, so the MBean names/attributes match 
exactly what the existing `jmx_prometheus_javaagent` configs 
(`server.yml`/`broker.yml`/`controller.yml`/`minion.yml`) expect. **No metric 
is renamed.**
   - **Prometheus leg (opt-in):** a Micrometer `PrometheusMeterRegistry` that 
exports metrics directly in Prometheus exposition format (no JMX hop) and can 
serve a scrape endpoint. It mirrors each metric at *read time* via function 
meters over the live Dropwizard objects, so enabling it does not affect the JMX 
leg.
   
   The default metrics factory (Yammer) is **unchanged**; this backend is 
opt-in by setting the factory class name.
   
   ## Configuration
   
   All keys under `pinot.metrics.micrometer.`:
   
   | Key | Default | Meaning |
   |---|---|---|
   | `jmx.enabled` | `true` | Export JMX MBeans |
   | `jmx.domain` | `org.apache.pinot.common.metrics` | JMX domain |
   | `prometheus.enabled` | `false` | Enable the direct-Prometheus leg |
   | `prometheus.port` | `0` | Scrape-endpoint port (`0` = no HTTP server) |
   | `prometheus.path` | `/metrics` | Scrape-endpoint path |
   
   JMX-only is the default, so out of the box this is byte-for-byte equivalent 
to the existing JMX → Prometheus pipeline with no extra memory.
   
   ## Testing
   
   Reuses the existing exhaustive `PinotPrometheusMetricsTest` harness: new 
`Micrometer{Server,Broker,Controller,Minion}PrometheusMetricsTest` subclasses 
run the real JMX exporter against the production yml and assert name+label 
parity for **every** metric enum value (server/broker/controller/minion + MSE). 
Plus `MicrometerPrometheusLegTest` asserts the Prometheus leg mirrors live 
values and serves them over HTTP. **689 tests, all passing.**
   
   ## Notes
   
   - This is the first step of a larger effort; the JMX leg intentionally 
reuses the Dropwizard metric model, so several SPI wrappers are near-identical 
to the `pinot-dropwizard` module's. This is documented with a follow-up TODO to 
de-duplicate once native, tag-first Micrometer wrappers land.
   - Backward compatibility: no change to the default backend, the metrics SPI, 
or any metric name.
   
   ## Release Notes
   
   Adds an opt-in Micrometer metrics backend that preserves existing 
JMX/Prometheus metric names and can additionally export directly to Prometheus.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to