apache / apache/pulsar

[improve][broker] Enhance broker metrics to support URL parameter filtering

Open
#21,663 3 comments 1 reaction 1 assignee Claimed by @zwOvO View on GitHub
type/enhancement
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Motivation

The motivation for enhancing broker metrics to support URL parameter filtering in Pulsar is to provide users with a more flexible and convenient way to retrieve specific metrics. By allowing filtering through URL parameters, users can easily specify the metrics they are interested in, making it easier to monitor and analyze the performance of the Pulsar broker. This enhancement would improve the usability and accessibility of the metrics system, ultimately leading to a better user experience for Pulsar users.

### Solution

for example:
1. /metrics?m=jvm_.*
2. /metrics?m=pulsar_managedLedger_client_per_channel_bookie_client_bookie_.*

### Alternatives

_No response_

### Anything else?

Currently, the broker metrics should be enhanced to allow filtering by URL parameters. This enhancement will enable users to filter metrics using URL parameters
$ curl --location --request GET 'http://127.0.0.1:8080/metrics' 2>/dev/null|wc -l
100000

$ curl --location --request GET 'http://127.0.0.1:8080/metrics' 2>/dev/null|grep 'jvm_'|wc -l
20

### Are you willing to submit a PR?

- [X] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.