You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "gortiz (via GitHub)" <gi...@apache.org> on 2026/06/17 10:55:25 UTC
[PR] Add Micrometer metrics backend (JMX parity + opt-in direct Prometheus export) [pinot]
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Add Micrometer metrics backend (JMX parity + opt-in direct Prometheus export) [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #18786:
URL: https://github.com/apache/pinot/pull/18786#issuecomment-4730055043
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/18786?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 56.97%. Comparing base ([`b27a3ad`](https://app.codecov.io/gh/apache/pinot/commit/b27a3ad888051e521558a6629903aee64766a7fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`2b8838b`](https://app.codecov.io/gh/apache/pinot/commit/2b8838b47274404c7e03930a5b1d255a9a6b50dd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 16 commits behind head on master.
> :exclamation: There is a different number of reports uploaded between BASE (b27a3ad) and HEAD (2b8838b). Click for more details.
>
> <details><summary>HEAD has 16 uploads less than BASE</summary>
>
>| Flag | BASE (b27a3ad) | HEAD (2b8838b) |
>|------|------|------|
>|java-21|5|1|
>|unittests|2|1|
>|temurin|5|1|
>|unittests2|1|0|
>|integration|3|0|
>|integration1|1|0|
>|custom-integration1|1|0|
>|integration2|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #18786 +/- ##
============================================
- Coverage 64.78% 56.97% -7.81%
+ Complexity 1309 1 -1308
============================================
Files 3380 2591 -789
Lines 209544 151137 -58407
Branches 32797 24457 -8340
============================================
- Hits 135746 86113 -49633
+ Misses 62870 57723 -5147
+ Partials 10928 7301 -3627
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/18786/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/18786/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/18786/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/18786/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/18786/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/18786/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.97% <ø> (-7.81%)` | :arrow_down: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/18786/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.97% <ø> (-7.81%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/18786/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.97% <ø> (-7.81%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/18786/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.97% <ø> (+0.01%)` | :arrow_up: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/18786/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/pinot/pull/18786?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org