We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3dd22a4 commit f0ff687Copy full SHA for f0ff687
agent-control/src/health/health_checker.rs
@@ -291,16 +291,17 @@ where
291
E: HealthEventPublisher,
292
{
293
let callback = move |stop_consumer: EventConsumer<CancellationMessage>| {
294
- let span = info_span!(
295
- "health_check",
296
- { ID_ATTRIBUTE_NAME } = %agent_id
297
- );
298
- let _guard = span.enter();
299
debug!("Starting to check health with the configured checker");
300
301
sleep(initial_delay.into());
302
303
loop {
+ let span = info_span!(
+ "health_check",
+ { ID_ATTRIBUTE_NAME } = %agent_id
+ );
+ let _guard = span.enter();
304
+
305
debug!("Checking health");
306
let health = health_checker.check_health().unwrap_or_else(|err| {
307
debug!(last_error = %err, "The configured health check failed");
0 commit comments