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

[RFC] 进程(异常)退出前尚在执行中的采样立即结束 #195

Closed
hyj1991 opened this issue Sep 28, 2022 · 0 comments · Fixed by #203
Closed

[RFC] 进程(异常)退出前尚在执行中的采样立即结束 #195

hyj1991 opened this issue Sep 28, 2022 · 0 comments · Fixed by #203
Assignees
Labels

Comments

@hyj1991
Copy link
Member

hyj1991 commented Sep 28, 2022

背景

EZM 监控服务的实践中,一些应用存在(异常)指标告警时,开发者通常会执行 CPU Profile / GC 追踪 等操作,监控服务端默认配置了 5min 的采样时间往往来不及完成采样动作进程就已经退出

此时,WatchDog 还未到设定的采样时间,导致进程(异常)退出后开发者执行的采样文件丢失。

优化

EnvironmentData 中添加一个标记位,在 AtExit 钩子触发时,通过配置这个标记位来通知正在执行中的采样操作(如果有)立即结束,保证采样文件正常 dump 完成后退出进程。

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

Successfully merging a pull request may close this issue.

1 participant