-
Notifications
You must be signed in to change notification settings - Fork 385
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
base: main
Are you sure you want to change the base?
Conversation
s.metaManager = k8smeta.GetMetaManagerInstance() | ||
s.configName = context.GetConfigName() | ||
|
||
metricRecord := s.context.GetMetricRecord() | ||
s.entityCount = helper.NewCounterMetricAndRegister(metricRecord, "k8s_meta_entity_count") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
命名规范
@@ -33,19 +34,27 @@ type ServiceK8sMeta struct { | |||
Ingress bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
domain去掉,增加个部署形态参数。
部署形态决定集群类型,以及entity前缀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
连边acs.k8s.pod --> acs.ack.cluster
"value.k8s_meta_http_avg_latency": avgLatency, | ||
"value.k8s_meta_http_max_latency": strconv.FormatInt(m.maxLatency.Load(), 10), | ||
} | ||
m.requestCount.Add(-m.requestCount.Load()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
再确认下
@@ -369,8 +372,8 @@ func (m *metaCollector) generateClusterEntity() models.PipelineEvent { | |||
log.Contents = models.NewLogContents() | |||
log.Timestamp = uint64(time.Now().Unix()) | |||
log.Contents.Add(entityDomainFieldName, m.serviceK8sMeta.Domain) | |||
log.Contents.Add(entityTypeFieldName, "infra.k8s.cluster") | |||
log.Contents.Add(entityIDFieldName, m.genKey("", "")) | |||
log.Contents.Add(entityTypeFieldName, m.genEntityTypeKey("cluster")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
container等定义成常量
1. 新增可观测指标:
2. 调整部分entity和link字段
3. 支持没有采集配置时,仍然可以启动HTTP Server(ebpf场景)