Skip to content

Commit

Permalink
Issue #203: Refactor-Extensions-code-to-check-protocol-efficiently
Browse files Browse the repository at this point in the history
Fixed style
  • Loading branch information
SafaeAJ committed Jun 4, 2024
1 parent 93544ac commit 92a15f9
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,21 @@ public ProtocolHealthCheckStrategy(
public void run() {
// Call the extensions to check the protocol health
final List<IProtocolExtension> protocolExtensions = extensionManager.findProtocolCheckExtensions(telemetryManager);
// CHECKSTYLE:OFF
protocolExtensions.forEach(protocolExtension ->
protocolExtension
.checkProtocol(telemetryManager)
.ifPresent(isUp ->
new MetricFactory()
.collectNumberMetric(
telemetryManager.getEndpointHostMonitor(),
"metricshub.host.up{protocol=\"" + protocolExtension.getIdentifier() + "\"}",
isUp ? UP : DOWN,
telemetryManager.getStrategyTime()
)
// CHECKSTYLE:OFF
protocolExtensions.forEach(protocolExtension ->
protocolExtension
.checkProtocol(telemetryManager)
.ifPresent(isUp ->
new MetricFactory()
.collectNumberMetric(
telemetryManager.getEndpointHostMonitor(),
"metricshub.host.up{protocol=\"" + protocolExtension.getIdentifier() + "\"}",
isUp ? UP : DOWN,
telemetryManager.getStrategyTime()
)
);
// CHECKSTYLE:ON
)
);
// CHECKSTYLE:ON
}

@Override
Expand Down

0 comments on commit 92a15f9

Please sign in to comment.