Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[improve][pip] PIP-347: add role field in consumer's stat #22564

Merged
merged 7 commits into from
May 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pip/pip-347.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,22 @@ It can save a lot of time and improve the efficiency of the operation and mainte

## Public-facing Changes

### Public API
Add a new option `exposeRole` for following endpoints:
- `GET /admin/v2/persistent/{tenant}/{namespace}/{topic}/partitioned-stats`
- `GET /admin/v2/persistent/{tenant}/{namespace}/{topic}/stats`
- `GET /admin/v2/non-persistent/{tenant}/{namespace}/{topic}/partitioned-stats`
- `GET /admin/v2/non-persistent/{tenant}/{namespace}/{topic}/stats`

`exposeRole` is a boolean value, default is false. If it's true and the user is a super-user or a tenant admin, the role info will be exposed.

### CLI
Add a new option `--expose-role` for command `bin/pulsar-admin topics partitioned-stats`
and `bin/pulsar-admin topics stats` to show the role info of the consumer.

### ADMIN API
Add a new input parameter `exposeRole` in the `admin.topics().getPartitionedStats` and `admin.topics().getStats` to show the role info of the consumer.


# Backward & Forward Compatibility

Expand Down