afterincomparableyum opened a new pull request, #3734:
URL: https://github.com/apache/celeborn/pull/3734
<!--
Thanks for sending a pull request! Here are some tips for you:
- Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX]
Your PR title ...'.
- Be sure to keep the PR description updated to reflect all changes.
- Please write your PR title to summarize what this PR proposes.
- If possible, provide a concise example to reproduce the issue for a
faster review.
-->
### What changes were proposed in this pull request?
AbstractSource emits a `# HELP` and `# TYPE` line for every metric sample.
When a metric family has multiple label sets — like ActiveConnectionCount (per
application), RequestSlotsFailedCount (per status code), per-user/app resource
consumption, or FlushWorkingQueueSize (per mountpoint) — the same family is
exported with repeated `# HELP` and `# TYPE` lines. This violates the
Prometheus exposition format.
The fix is to override PrometheusServlet.getMetricsSnapshot to keep only the
first `# HELP` and `# TYPE` line per metric family while preserving all sample
lines, producing valid Prometheus output.
I also added a PrometheusServletSuite covering a multi-label-set counter and
a distinct gauge.
### Why are the changes needed?
To dedup the help and type lines to no longer violate prometheus exposition
format.
### Does this PR resolve a correctness bug?
<!-- Check if yes. The `correctness` label will be added/removed
automatically. -->
- [1] Yes
### Does this PR introduce _any_ user-facing change?
<!-- Check if yes. -->
- [ ] Yes
### How was this patch tested?
CI/CD
--
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]