pinpoint agent线程模型

本文分析了Pinpoint 1.7.1版本的Agent线程模型,包括DeadlockMonitorThread(死锁监测)、AgentInfoSender(定时任务上报)、DefaultAgentStatMonitor(JVM状态上报)和TcpDataSender(调用链数据上报)。数据上报通过单线程和队列实现,失败数据将重试,默认最大队列大小为5120。底层通信采用Netty的NIO, UDP通道与TCP类似。日志打印需谨慎,避免对应用性能影响。
摘要由CSDN通过智能技术生成

pinpoint agent线程模型

以下分析基于pinpoint1.7.1版本

pinpoint agent主要使用到的异步线程有4个

DeadlockMonitorThread : 死锁监测线程,执行一次休眠60s

public DeadlockMonitorThread(DeadlockThreadRegistry deadlockThreadRegistry, long intervalMillis) {
    this.deadlockMonitorTask = new DeadlockMonitorTask(deadlockThreadRegistry, intervalMillis);
    this.deadlockMonitorThread = new Thread(deadlockMonitorTask, "Pinpoint-deadlock-monitor");
    this.deadlockMonitorThread.setDaemon(true);
    // for preload
    deadlockMonitorTask.doTask();
}

AgentInfoSender: agent信息上报定时任务,是个timer,3秒上报一次

DefaultAgentStatMonitor: agent状态信息上报(jvm状态等),线程数为1的定时线程池(ScheduledExecutorService),延迟5秒执行,每5秒上报一次

private final ScheduledExecutorService execut
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值