[TSG-18743] - To adapt the application and protocol metric log field modifications.
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.zdjizhi</groupId>
|
<groupId>com.zdjizhi</groupId>
|
||||||
<artifactId>app-protocol-stat-traffic-merge</artifactId>
|
<artifactId>app-protocol-stat-traffic-merge</artifactId>
|
||||||
<version>2.1.0</version>
|
<version>2.2.0</version>
|
||||||
|
|
||||||
<name>app-protocol-stat-traffic-merge</name>
|
<name>app-protocol-stat-traffic-merge</name>
|
||||||
<url>http://www.example.com</url>
|
<url>http://www.example.com</url>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class Tags {
|
|||||||
return protocol_stack_id;
|
return protocol_stack_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "protocol_label")
|
@JSONField(name = "decoded_path")
|
||||||
public void setProtocol_stack_id(String protocol_stack_id) {
|
public void setProtocol_stack_id(String protocol_stack_id) {
|
||||||
this.protocol_stack_id = protocol_stack_id;
|
this.protocol_stack_id = protocol_stack_id;
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ public class Tags {
|
|||||||
return app_name;
|
return app_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "app_full_path")
|
@JSONField(name = "app")
|
||||||
public void setApp_name(String app_name) {
|
public void setApp_name(String app_name) {
|
||||||
this.app_name = app_name;
|
this.app_name = app_name;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,11 +28,13 @@ public class ParsingData extends ProcessFunction<String, Tuple3<Tags, Fields, Lo
|
|||||||
Tags tags = JSONObject.parseObject(originalLog.getString("tags"), Tags.class);
|
Tags tags = JSONObject.parseObject(originalLog.getString("tags"), Tags.class);
|
||||||
Long timestamp_ms = originalLog.getLong("timestamp_ms");
|
Long timestamp_ms = originalLog.getLong("timestamp_ms");
|
||||||
|
|
||||||
|
if (StringUtil.isNotBlank(tags.getProtocol_stack_id())) {
|
||||||
joinProtocol(tags);
|
joinProtocol(tags);
|
||||||
|
|
||||||
out.collect(new Tuple3<>(tags, fields, timestamp_ms));
|
out.collect(new Tuple3<>(tags, fields, timestamp_ms));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
logger.error("Parsing application_protocol_stat data is abnormal! The exception message is: {}", e.getMessage());
|
logger.error("Parsing application_protocol_stat data is abnormal! The exception message is: {}", e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user