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

[OPTIMIZATION] record pre putMessageDistributeTime #5615

Closed
hujie6 opened this issue Nov 30, 2022 · 4 comments
Closed

[OPTIMIZATION] record pre putMessageDistributeTime #5615

hujie6 opened this issue Nov 30, 2022 · 4 comments

Comments

@hujie6
Copy link

hujie6 commented Nov 30, 2022

version:
rocketmq 4.8.0
rocketmq-exporter

Q: when i use rocketmq exporter to collect rocketmq cluster metrics(collection period is one minute), i find that the putMessageDistributeTime of broker is not correct by calling fetchBrokerRuntimeStats. And then i reviewed StoreStatsService, putMessageDistributeTime could be initialized every minute when calling printTps method. if exporter's collection time is different from StoreStatsService printTps time, user will get incorrect putMessageDistributeTime.

how to fix:
we should record old putMessageDistributeTime when init putMessageDistributeTime every time. when calling fetchBrokerRuntimeStats to get putMessageDistributeTime, we should return the old putMessageDistributeTime.

@hujie6
Copy link
Author

hujie6 commented Nov 30, 2022

I had optimized it, and i got correct putMessageDistributeTime. maybe i can submit a pull request if possible

@ShadowySpirits
Copy link
Member

PR is welcome! And we introduce new metrics for RocketMQ, see RIP-46 and Spec please.

@lizhimins
Copy link
Member

Nice

@hujie6
Copy link
Author

hujie6 commented Nov 30, 2022

PR is welcome! And we introduce new metrics for RocketMQ, see RIP-46 and Spec please.

i find rocketmq 5.0 had fixed this bug. this issue can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants