Commit fb666506 authored by Florian Fittkau's avatar Florian Fittkau

also monitor the programming language as meta info

parent 09384622
......@@ -17,6 +17,7 @@ explorviz.live_trace_processing.system_name=
explorviz.live_trace_processing.ip_address=
explorviz.live_trace_processing.host_name=
explorviz.live_trace_processing.application_name=
explorviz.live_trace_processing.programming_language=Java
explorviz.live_trace_processing.debug=false
......
......@@ -31,6 +31,7 @@ public class TCPWriter implements EventHandler<ByteBufferEvent>, IWriter {
private int ipaddressId;
private int hostnameId;
private int applicationId;
private int languageId;
private final Configuration configuration;
......@@ -75,6 +76,8 @@ public class TCPWriter implements EventHandler<ByteBufferEvent>, IWriter {
setIpAddress(configuration.getStringProperty(ConfigurationFactory.IP_ADDRESS));
setHostname(configuration.getStringProperty(ConfigurationFactory.HOST_NAME));
setApplicationName(configuration.getStringProperty(ConfigurationFactory.APPLICATION_NAME));
setProgrammingLanguage(configuration
.getStringProperty(ConfigurationFactory.PROGRAMMING_LANGUAGE));
}
public void setSystemName(String systemname) {
......@@ -126,6 +129,15 @@ public class TCPWriter implements EventHandler<ByteBufferEvent>, IWriter {
applicationId = MonitoringStringRegistry.getIdForStringWithoutSending(applicationName);
}
public void setProgrammingLanguage(String programmingLanguageParam) {
if (programmingLanguageParam.isEmpty()) {
programmingLanguageParam = "<UNKNOWN-LANGUAGE>";
}
languageId = MonitoringStringRegistry
.getIdForStringWithoutSending(programmingLanguageParam);
}
@Override
public void connect() throws IOException {
while (shouldDisconnect) {
......@@ -145,6 +157,7 @@ public class TCPWriter implements EventHandler<ByteBufferEvent>, IWriter {
bufferForMetaData.putInt(ipaddressId);
bufferForMetaData.putInt(hostnameId);
bufferForMetaData.putInt(applicationId);
bufferForMetaData.putInt(languageId);
bufferForMetaData.flip();
if (socketChannel.isConnected()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment