diff --git a/components/inspectit-ocelot-configurationserver-ui/src/components/views/status/StatusTable.js b/components/inspectit-ocelot-configurationserver-ui/src/components/views/status/StatusTable.js index 6be7443a78..b7ad9f1a32 100644 --- a/components/inspectit-ocelot-configurationserver-ui/src/components/views/status/StatusTable.js +++ b/components/inspectit-ocelot-configurationserver-ui/src/components/views/status/StatusTable.js @@ -293,10 +293,19 @@ class StatusTable extends React.Component { agentHealthTemplate = (rowData) => { const { onShowHealthStateDialog } = this.props; - const { healthState, metaInformation } = rowData; - const { health } = healthState; - const { agentId } = metaInformation; const { onShowDownloadDialog } = this.props; + const { metaInformation } = rowData; + const { agentId } = metaInformation; + // TODO Remove console.error() after agent health issues are solved + let health; + let healthState; + try { + healthState = rowData['healthState']; + health = healthState['health']; + } catch (error) { + console.error(`Could not read agent health from ${agentId}`, error); + console.error(rowData); + } let { agentCommandsEnabled, supportArchiveAvailable } = this.resolveServiceAvailability(metaInformation); diff --git a/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/agentconfiguration/AgentConfigurationManager.java b/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/agentconfiguration/AgentConfigurationManager.java index 7760b3477a..9561fac1aa 100644 --- a/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/agentconfiguration/AgentConfigurationManager.java +++ b/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/agentconfiguration/AgentConfigurationManager.java @@ -91,6 +91,7 @@ private synchronized void reloadConfigurationAsync() { */ public AgentConfiguration getConfiguration(Map agentAttributes) { AgentConfiguration myConfig = attributesToConfigurationCache.getUnchecked(agentAttributes); + log.debug("Found agent configuration: {}", myConfig != NO_MATCHING_MAPPING); return myConfig == NO_MATCHING_MAPPING ? null : myConfig; } diff --git a/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/agentstatus/AgentStatusManager.java b/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/agentstatus/AgentStatusManager.java index ac9c5e585d..00b2c26ec6 100644 --- a/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/agentstatus/AgentStatusManager.java +++ b/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/agentstatus/AgentStatusManager.java @@ -97,6 +97,7 @@ public void notifyAgentConfigurationFetched(Map agentAttributes, logHealthIfChanged(statusKey, agentHealthState); } + log.debug("Storing agent status of {}: ({})", statusKey, agentStatus); attributesToAgentStatusCache.put(statusKey, agentStatus); } diff --git a/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/agent/AgentController.java b/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/agent/AgentController.java index 29d8fd7fcf..cc37ea00a5 100644 --- a/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/agent/AgentController.java +++ b/components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/agent/AgentController.java @@ -62,6 +62,7 @@ public void e(Exception e) { @GetMapping(value = {"agent/configuration", "agent/configuration/"}, produces = "application/x-yaml") public ResponseEntity fetchConfiguration(@Parameter(description = "The agent attributes used to select the correct mapping") @RequestParam Map attributes, @RequestHeader Map headers) { log.debug("Fetching the agent configuration for agent ({})", attributes.toString()); + log.debug("Receiving agent headers ({})", headers.toString()); AgentConfiguration configuration = configManager.getConfiguration(attributes); statusManager.notifyAgentConfigurationFetched(attributes, headers, configuration); if (configuration == null) { diff --git a/components/inspectit-ocelot-configurationserver/src/main/resources/logback.xml b/components/inspectit-ocelot-configurationserver/src/main/resources/logback.xml index 8465eb4ad7..3d3d591731 100644 --- a/components/inspectit-ocelot-configurationserver/src/main/resources/logback.xml +++ b/components/inspectit-ocelot-configurationserver/src/main/resources/logback.xml @@ -54,6 +54,13 @@ + + + + + + + @@ -68,4 +75,4 @@ - \ No newline at end of file +