Include reporter in endpoint health report
This commit is contained in:
@@ -500,6 +500,7 @@ func (s *vpnFabricEndpointObservationStore) Report(observedAt time.Time, maxEntr
|
||||
if len(snapshot) == 0 {
|
||||
return map[string]any{
|
||||
"schema_version": "rap.vpn_fabric_endpoint_health_report.v1",
|
||||
"reporter_node_id": s.reporterNodeID,
|
||||
"observed_at": observedAt.UTC().Format(time.RFC3339Nano),
|
||||
"total": 0,
|
||||
"reported": 0,
|
||||
@@ -523,6 +524,7 @@ func (s *vpnFabricEndpointObservationStore) Report(observedAt time.Time, maxEntr
|
||||
reported := values[:maxEntries]
|
||||
return map[string]any{
|
||||
"schema_version": "rap.vpn_fabric_endpoint_health_report.v1",
|
||||
"reporter_node_id": s.reporterNodeID,
|
||||
"observed_at": observedAt.UTC().Format(time.RFC3339Nano),
|
||||
"total": len(values),
|
||||
"reported": len(reported),
|
||||
|
||||
@@ -804,6 +804,7 @@ func TestVPNFabricEndpointObservationReportIsBoundedAndNewestFirst(t *testing.T)
|
||||
}
|
||||
report := store.Report(base, 1)
|
||||
if report["schema_version"] != "rap.vpn_fabric_endpoint_health_report.v1" ||
|
||||
report["reporter_node_id"] != "node-a" ||
|
||||
report["total"] != 2 ||
|
||||
report["reported"] != 1 ||
|
||||
report["dropped"] != 1 {
|
||||
|
||||
@@ -345,6 +345,8 @@ those remote health hints with local observations using the newest signal.
|
||||
Endpoint health observations include source and reporter node fields so control
|
||||
plane can distinguish local dial feedback from aggregated or policy-generated
|
||||
health hints.
|
||||
The endpoint health heartbeat report also includes the reporter node id at the
|
||||
report level for simpler multi-node ingestion and diagnostics.
|
||||
|
||||
Deliverables:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user