腾讯mini项目-【指标监控服务重构-会议记录】2023-07-06

7/6 会议记录

image-20230706153207624

image-20230706153217681

image-20230706153227062

Profile4个步骤

  1. 解压kafka消息
  2. 初始化性能事件,分析事件
  3. 将数据写入kafka
  4. Run 开始执行各stage handler
    1. 上报耗时到otel-collector
    2. 。。。
// ConsumerDispatchHandler consumer
//
//	@param msg *sarama.ConsumerMessage
//	@param consumer *databus.KafkaConsumer
//	@return err error
//	@author honeygong
func ConsumerDispatchHandler(msg *kafka.Message, consumer *kc.Consumer) (err error) {
	ctx, err := _consumer.NewProfileContext(msg, consumer, 1*time.Minute)
	if err != nil {
		return
	}
	ctx.AddBaseHandler(ctx.UnpackKafkaMessage, "", true)
	ctx.AddBaseHandler(ctx.InitPerformanceEvent, "", true).AddBaseHandler(ctx.AnalyzeEvent, "", true)
	ctx.AddBaseHandler(ctx.WriteKafka, "", true)
	ctx.Run()
	return
}

性能事件

  1. crash

    // Crash performance event crash
    //
    //	@author kevineluo
    //	@update 2023-07-05 07:46:11
    type Crash struct {
    	// upload fields
    	MemoryFreeBytes  int64  `json:"memory_free"`
    	MemoryMaxBytes   int64  `json:"memory_max"`
    	MemoryTotalBytes int64  `json:"memory_total"`
    	RemainDiskBytes  int64  `json:"remain_disk"`
    	CrashedThread    string `json:"crashed_thread"`
    	CrashType        string `json:"crash_type"`
    	LoseData         string `json:"lose_data"`
    	RepeatOccur      string `json:"repeat_occur"`
    
    	// analysis fields(produced by profile)
    	MemoryUsage float64 `json:"memory_usage"`
    	CrashDegree float64 `json:"crash_degree"`
    }
    
  2. lag

    // Lag performance event lag
    //
    //	@author kevineluo
    //	@update 2023-07-05 07:24:12
    type Lag struct {
    	// upload fields
    	TimeCost         int64  `json:"time_cost"`
    	Stage            string `json:"stage"`
    	ProcessName      string `json:"process_name"`
    	Type             string `json:"type"`
    	FunctionTimeCost int64  `json:"function_time_cost"`
    	Range0           int64  `json:"range_0"`
    	Range1           int64  `json:"range_1"`
    	Range2_4         int64  `json:"range_2_4"`
    	Range4_8         int64  `json:"range_4_8"`
    	Range8_16        int64  `json:"range_8_16"`
    	Range16Inf       int64  `json:"range_16_inf"`
    	DropCollectMS    int64  `json:"drop_collect_ms"`
    	DropCount        int64  `json:"drop_count"`
    
    	// analysis fields(produced by profile)
    	MainFuncPercent float64 `json:"main_func_percent"`
    	Fluency         float64 `json:"fluency"`
    	FPS             float64 `json:"fps"`
    }
    

ProfileContext维护Events

SLI :监控的指标目标

Venus:数据上报时延、成功率

Profile:数据的完整率、健康率、数据上报的处理时间延迟、成功率

Coding项目管理

项目待办、进度、需求、文档管理

待办:

  1. 阅读代码
  2. 分配任务
  3. 设计SLI

**提供:**2台服务器和CK

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

奥库甘道夫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值