Skip to content

Commit 332482a

Browse files
authored
feat: Set instance endpoint status and endpoint health status (#3411)
Signed-off-by: [email protected] <[email protected]>
1 parent 36116d7 commit 332482a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/runtime/src/component/endpoint.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,14 @@ impl EndpointConfigBuilder {
138138
instance_id: lease_id,
139139
transport: TransportType::NatsTcp(subject.clone()),
140140
};
141-
tracing::debug!(subject = %subject, "Registering endpoint health check target");
141+
tracing::debug!(endpoint_name = %endpoint_name, "Registering endpoint health check target");
142142
let guard = system_health.lock().unwrap();
143-
guard.register_health_check_target(&subject, instance, health_check_payload.clone());
144-
if let Some(notifier) = guard.get_endpoint_health_check_notifier(&subject) {
143+
guard.register_health_check_target(
144+
&endpoint_name,
145+
instance,
146+
health_check_payload.clone(),
147+
);
148+
if let Some(notifier) = guard.get_endpoint_health_check_notifier(&endpoint_name) {
145149
handler.set_endpoint_health_check_notifier(notifier)?;
146150
}
147151
}

0 commit comments

Comments
 (0)