use of com.yahoo.vespa.hosted.dockerapi.DockerExecTimeoutException in project vespa by vespa-engine.
the class NodeAgentImpl method pushMetricsToContainer.
private void pushMetricsToContainer(List<DimensionMetrics> metrics) {
StringBuilder params = new StringBuilder();
try {
for (DimensionMetrics dimensionMetrics : metrics) {
params.append(dimensionMetrics.toSecretAgentReport());
}
String wrappedMetrics = "s:" + params.toString();
// Push metrics to the metrics proxy in each container - give it maximum 1 seconds to complete
String[] command = { "vespa-rpc-invoke", "-t", "2", "tcp/localhost:19091", "setExtraMetrics", wrappedMetrics };
dockerOperations.executeCommandInContainerAsRoot(containerName, 5L, command);
} catch (DockerExecTimeoutException | JsonProcessingException e) {
logger.warning("Unable to push metrics to container: " + containerName, e);
}
}
Aggregations