kubernetes_workload_observed:从拥有边界到可信查询
将 kubernetes_workload_observed 视为持久的分析合约:所有者发出一个记录的谷物,一个固定装置证明字段,并且经过审查的查询回答所述问题。
- 1
结果成为最终结果
Cluster collector or deployment health controller emits only on a documented interval and immediately after a reviewed workload-state transition.
- 2
选择字段
8 required fields preserve the declared grain: One workload snapshot per cluster, namespace, and interval.
- 3
夹具已验证
检查类型、UTC 时间、替代结果、幂等性以及每个假名或评论分类字段。
- 4
问题得到解答
哪些工作负载、集群和版本正在重新启动、不可用或资源受限?
谷物
每个集群、命名空间和时间间隔一个工作负载快照。
业主
集群收集器或部署健康控制器
何时发出
在记录的时间间隔内以及在审查的工作负载状态转换之后立即进行。
现场合同
字段类型和应排除的数据
在生产查询依赖现有字段名称和类型后,保持现有字段名称和类型稳定。可选上下文应受到特定决策的限制、记录和证明。
| 字段 | 类型 | 必填 | 隐私 | 含义 |
|---|---|---|---|---|
| timestamp_utc | timestamp | yes | non-sensitive | 结果边界处的 UTC 时间。 |
| event_id | string | yes | non-sensitive | 用于重复数据删除的稳定唯一标识符。 |
| release | string | yes | non-sensitive | 发出事件的应用程序或服务版本。 |
| cluster | string | yes | review | 批准的稳定集群标识符。 |
| namespace | string | yes | review | 已批准的命名空间标签,不含租户派生值。 |
| workload | string | yes | non-sensitive | Stable Deployment、StatefulSet 或 DaemonSet 名称。 |
| ready_replicas | number | yes | non-sensitive | 观察时的就绪副本计数。 |
| restart_count | number | yes | non-sensitive | 测量的工作负载范围内的累积重新启动次数。 |
合成 JSON 事件
{
"timestamp_utc": "2026-07-29T09:25:00Z",
"event_id": "evt_k8s_01",
"release": "collector-2026.07.3",
"cluster": "production-us-west",
"namespace": "telemetry",
"workload": "query-api",
"ready_replicas": 4,
"restart_count": 1
}隐私审查
摄取前检查标识符
此示例使用合成标识符。假名值仍然可以是个人数据,并且审核字段可以公开业务或提供商上下文。应用您自己的同意、保留、访问、居住和删除要求。
cluster: reviewnamespace: review
验证清单
在构建仪表板之前证明合同
- Send one known kubernetes_workload_observed fixture after the documented outcome boundary.
- Verify all 8 required fields arrive with the documented types.
- 重试相同的事件标识符并确认所选的重复数据删除行为。
- 当工作流支持时,发送受控失败或替代结果。
- 在固定窗口上运行相关 SQL 并将结果与固定装置进行协调。
常见错误
保持一行等于一个持久结果
- Emitting kubernetes_workload_observed before cluster collector or deployment health controller knows the final outcome.
- 在一张表中混合多种谷物,这使得计数和比率不明确。
- 用原始 URL、有效负载、提示或错误文本替换受控类别。
- 保存查询和仪表板依赖于它后就地更改字段类型。
- 添加标识符,无需记录调查、访问和保留需求。
使用合同
查询并操作事件
相关合同
在接入生产流量前发送测试事件
创建免费的 API 密钥、发送合成事件并在连接实时工作流程之前检查推断表。