Skip to content
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

[Backport 2.15] add logging for remote monitor execution flows #1688

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ object MonitorRunnerService : JobRunner, CoroutineScope, AbstractLifecycleCompon
} else {
if (monitorCtx.remoteMonitors.containsKey(monitor.monitorType)) {
if (monitor.monitorType.endsWith(Monitor.MonitorType.DOC_LEVEL_MONITOR.value)) {
logger.info("Executing remote document monitor of type ${monitor.monitorType} id ${monitor.id}")
return RemoteDocumentLevelMonitorRunner().runMonitor(
monitor,
monitorCtx,
Expand All @@ -490,6 +491,7 @@ object MonitorRunnerService : JobRunner, CoroutineScope, AbstractLifecycleCompon
transportService = transportService
)
} else {
logger.info("Executing remote monitor of type ${monitor.monitorType} id ${monitor.id}")
return monitorCtx.remoteMonitors[monitor.monitorType]!!.monitorRunner.runMonitor(
monitor,
periodStart,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ class TransportDocLevelMonitorFanOutAction
)
)
} catch (e: Exception) {
log.error("${request.monitor.id} Failed to run fan_out on node ${clusterService.localNode().id} due to error $e")
log.error(
"${request.monitor.id} Failed to run fan_out on node ${clusterService.localNode().id}." +
" for Monitor Type ${request.monitor.monitorType} ExecutionId ${request.executionId}",
e
)
listener.onFailure(AlertingException.wrap(e))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ open class RemoteMonitorRunner {
}

open fun getFanOutAction(): String {
return DocLevelMonitorFanOutAction.NAME
throw UnsupportedOperationException("Fan out action needs to be implemented by remote monitor.");
}

open suspend fun doFanOut(
Expand Down Expand Up @@ -185,4 +185,4 @@ open class RemoteMonitorRunner {
}
}
}
}
}
Loading