• 腾讯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
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17

    性能事件

    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"`
      }
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
    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"`
      }
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25

    ProfileContext维护Events

    SLI :监控的指标目标

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

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

    Coding项目管理

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

    待办:

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

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

  • 相关阅读:
    C++中的不规则二维数组
    调度策略漫谈
    pytorch中维度不一致张量之间加减/逻辑运算问题
    深入理解MySQL索引的数据结构和事务的四大特性、隔离性的四种级别
    金仓数据库KingbaseES 插件kdb_date_function
    CH06_第一组重构(上)
    想知道电脑录屏软件哪个好用?这三个工具轻松实现屏幕录制
    枚举&包装类
    Gradle-01:0基础入门
    orthofinder直系同源蛋白分析及结果处理
  • 原文地址:https://blog.csdn.net/xzx18822942899/article/details/133259541