Search in sources :

Example 1 with WebappInstanceDto

use of io.datarouter.instrumentation.webappinstance.WebappInstanceDto in project datarouter by hotpads.

the class WebappInstanceService method updateWebappInstanceTable.

public WebappInstance updateWebappInstanceTable() {
    String buildId = buildProperties.getBuildId();
    String commitId = gitProperties.getIdAbbrev().orElse(GitProperties.UNKNOWN_STRING);
    Counters.inc("App heartbeat " + serverType.getServerTypeString());
    Counters.inc("App heartbeat type-build " + serverType.getServerTypeString() + " " + buildId);
    Counters.inc("App heartbeat type-commit " + serverType.getServerTypeString() + " " + commitId);
    Counters.inc("App heartbeat build " + buildId);
    Counters.inc("App heartbeat commit " + commitId);
    WebappInstance webappInstance = buildCurrentWebappInstance();
    webappInstanceDao.put(webappInstance);
    webappInstanceLogDao.put(new WebappInstanceLog(webappInstance));
    if (settings.webappInstancePublisher.get()) {
        WebappInstanceDto dto = webappInstance.toDto();
        webappInstancePublisher.add(dto);
    }
    return webappInstance;
}
Also used : WebappInstanceDto(io.datarouter.instrumentation.webappinstance.WebappInstanceDto) WebappInstanceLog(io.datarouter.webappinstance.storage.webappinstancelog.WebappInstanceLog) WebappInstance(io.datarouter.webappinstance.storage.webappinstance.WebappInstance)

Aggregations

WebappInstanceDto (io.datarouter.instrumentation.webappinstance.WebappInstanceDto)1 WebappInstance (io.datarouter.webappinstance.storage.webappinstance.WebappInstance)1 WebappInstanceLog (io.datarouter.webappinstance.storage.webappinstancelog.WebappInstanceLog)1