apache / apache/rocketmq

[Bug] Lite client offline cleanup logs full gRPC Settings on failure

Open
#10,710 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
3d 1h
Merged PRs (30d)
27

Description

### Before Creating the Bug Report

- [x] I found a bug, not just asking a question, which should be created in GitHub Issues.
- [x] I have searched the existing issues and believe this is not a duplicate.
- [x] I have confirmed that this bug belongs to the current repository.

### Describe the Bug

`GrpcClientSettingsManager#offlineClientLiteSubscription` logs the full gRPC `Settings` object when cleanup fails:

```java
log.error("offlineClientLiteSubscription error, clientId:{}, settings:{}", clientId, settings, e);
```

`Settings` can contain client runtime metadata, subscription details, metric endpoint information, and future fields added by gRPC clients. Logging the whole protobuf object is unnecessary for diagnostics and can leak more client metadata than intended.

This is similar in spirit to recent telemetry log sanitization work, but this path is separate from `TelemetryCommand` write/exception logging.

### Expected Behavior

Failure logs should keep useful diagnostic fields while avoiding full protobuf serialization. For example, log only:

- client id
- client type
- consumer group
- first topic / topic count
- subscription count

The cleanup behavior should stay unchanged.

### Scope

RocketMQ Studio Track 2 / Proxy gRPC client diagnostics and safe operational logging.

### Proposed Fix

Replace the full `settings:{}` log argument with a compact sanitized summary helper, and add a regression test that verifies the summary does not include full subscription/filter details while preserving diagnostic fields.

Contributor guide

Open the contributing guide

Research direction

Locate GrpcClientSettingsManager#offlineClientLiteSubscription and inspect the cleanup failure logging path, then find the related regression-test patterns. Replace full Settings serialization with a compact sanitized summary containing the listed diagnostic fields, keep cleanup behavior unchanged, and verify the test excludes subscription and filter details while preserving those fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, java
Domain
backend, observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.