Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[stats] Do not expose meaningless stats for publisher #11454

Merged
merged 2 commits into from Jul 28, 2021

Conversation

massakam
Copy link
Contributor

Motivation

Currently, publisher stats includes some fields that are meaningless for users.

count
producerNameOffset
producerNameLength
addressOffset
addressLength
connectedSinceOffset
connectedSinceLength
clientVersionOffset
clientVersionLength
stringBuffer

These cause the size of the json data to grow and should not be exposed.

Modifications

Add the @JsonIgnore annotation to the above fields. This is a modification similar to #11005.

@massakam massakam added this to the 2.9.0 milestone Jul 25, 2021
@massakam massakam self-assigned this Jul 25, 2021
@codelipenghui codelipenghui added release/2.8.1 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages labels Jul 26, 2021
Copy link
Contributor

@315157973 315157973 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Anonymitaet
Copy link
Member

@massakam Thanks for your contribution. For this PR, do we need to update docs?

(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@massakam
Copy link
Contributor Author

@Anonymitaet Removed these fields from the json example in the documentation: 637b7aa

@massakam massakam added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Jul 27, 2021
@sijie sijie merged commit d3c44ba into apache:master Jul 28, 2021
@massakam massakam deleted the add-json-ignore branch July 29, 2021 01:24
codelipenghui pushed a commit that referenced this pull request Jul 30, 2021
Currently, publisher stats includes some fields that are meaningless for users.
```
count
producerNameOffset
producerNameLength
addressOffset
addressLength
connectedSinceOffset
connectedSinceLength
clientVersionOffset
clientVersionLength
stringBuffer
```
These cause the size of the json data to grow and should not be exposed.

Add the `@JsonIgnore` annotation to the above fields. This is a modification similar to #11005.

(cherry picked from commit d3c44ba)
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Jul 30, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
### Motivation

Currently, publisher stats includes some fields that are meaningless for users.
```
count
producerNameOffset
producerNameLength
addressOffset
addressLength
connectedSinceOffset
connectedSinceLength
clientVersionOffset
clientVersionLength
stringBuffer
```
These cause the size of the json data to grow and should not be exposed. 

### Modifications

Add the `@JsonIgnore` annotation to the above fields. This is a modification similar to apache#11005.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.8 Archived: 2.8 is end of life doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. release/2.8.1 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants