feat: add JFR RPC profiling support - #1578
Open
weilhuang wants to merge 1 commit into
Open
Conversation
Add the Profile SPI, JFR invocation events, bounded report generation, and Bolt/Triple correlation with invocation-scoped phase data. Relates to sofastackgh-1128
|
Hi @wl2027, welcome to SOFAStack community, Please sign Contributor License Agreement! After you signed CLA, we will automatically sync the status of this pull request in 3 minutes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
通过 JFR 记录 SOFA RPC 调用过程中的阶段耗时,并能够关联客户端和服务端数据,帮助定位“RPC 整体耗时较长,但无法确定时间消耗在哪个阶段”的问题。
profileId关联 Consumer 和 Provider;Modification:
core/api中增加ProfileSPI、ProfileFactory和Profiles门面;profileId或注册 JFR 订阅者;sofa-rpc-profile-jfr模块;ModuleSPI 在default.profile=jfr时自动安装;com.alipay.sofa.rpc.ClientInvocationcom.alipay.sofa.rpc.ServerInvocationRpcInternalContext中,避免异步调用之间相互覆盖。profileId;profileId关联不同进程、不同 JFR 文件中的客户端和服务端事件。jdk.jfr.consumerAPI,不引入 JMC SDK;.jfr文件;profileId关联;Result:
Relates to gh-1128