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

add K8s meta self metrics #1765

Merged
merged 29 commits into from
Oct 12, 2024
Merged

add K8s meta self metrics #1765

merged 29 commits into from
Oct 12, 2024

Conversation

Abingcbc
Copy link
Collaborator

@Abingcbc Abingcbc commented Sep 18, 2024

1. 新增可观测指标:

  • API Server 缓存(进程级)
    1. Add、Update、Delete 数量
    2. 写入队列长度
    3. 当前缓存资源数量
  • HTTP Server(进程级)
    1. QPS
    2. 平均延迟
    3. 最大延迟
  • Entity Store(插件级)
    1. 事件条数

2. 调整部分entity和link字段

  • domain
  • PodNodeLink 的 type
  • Container EntityID的计算方法(加入了Pod名,防止冲突)

3. 支持没有采集配置时,仍然可以启动HTTP Server(ebpf场景)

pkg/flags/flags.go Outdated Show resolved Hide resolved
pkg/helper/self_metrics_constants.go Outdated Show resolved Hide resolved
pkg/helper/self_metrics_constants.go Outdated Show resolved Hide resolved
* service_kubernetes_meta
**********************************************************/
const (
MetricPluginCollectEntityTotal = "plugin_collect_entity_total"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个命名不是太对,输入输出不需要再有特殊的标识,参考C++部分

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

找玄飏交流下

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里讨论下来,通用的输入输出没有办法表达两种数据类型的含义,所以这里相当于属于meta的特殊指标。

plugins/input/kubernetesmetav2/meta_collector.go Outdated Show resolved Hide resolved
@@ -84,7 +95,16 @@ func (m *MetaManager) Init(configPath string) (err error) {
return err
}
m.clientset = clientset
m.metricContext = &helper.LocalContext{}

m.metricRecord = pipeline.MetricsRecord{}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里直接初始化?label是什么?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是runner级别的,在导出的时候,会填入cluster id,runner name和project。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认的project要带上

@@ -84,7 +95,16 @@ func (m *MetaManager) Init(configPath string) (err error) {
return err
}
m.clientset = clientset
m.metricContext = &helper.LocalContext{}

m.metricRecord = pipeline.MetricsRecord{}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认的project要带上

@messixukejia messixukejia merged commit 513dc24 into main Oct 12, 2024
15 checks passed
@henryzhx8 henryzhx8 deleted the k8s_meta2 branch November 13, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants