Skip to content

Commit

Permalink
feat: add log field into es /ozhera-log
Browse files Browse the repository at this point in the history
  • Loading branch information
songyutong1 committed Dec 10, 2024
1 parent 66402b2 commit c55f162
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public class LogtailConfig {
private String type;
private Integer appType;

private String deploySpace;

private Integer parseType;
private String tail;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ public LogtailConfig assembleLogTailConfigs(Long tailId) {
logtailConfig.setParseScript(milogLogTail.getParseScript());
logtailConfig.setValueList(milogLogTail.getValueList());
logtailConfig.setAppType(milogLogTail.getAppType());
logtailConfig.setDeploySpace(milogLogTail.getDeploySpace());
// Query MQ information
handleTailConfig(tailId, milogLogTail.getStoreId(), milogLogTail.getSpaceId(),
milogLogTail.getMilogAppId(), logtailConfig, milogLogTail.getAppType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ public class LogStreamConstants {
public static final String LOG_STREAM_SPACE_ID = "spaceId";
public static final String LOG_STREAM_STORE_ID = "storeId";
public static final String LOG_STREAM_TAIL_ID = "tailId";
public static final String DEPLOY_SPACE = "deploy_space";

}
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ private SinkJobConfig buildSinkJobConfig(String type, String ak, String sk, Stri
.jobType(SinkJobEnum.NORMAL_JOB.name())
.storageType(sinkConfig.getStorageType())
.consumerGroup(logtailConfig.getConsumerGroup())
.deploySpace(logtailConfig.getDeploySpace())
.build();
sinkJobConfig.setLogTailId(logtailConfig.getLogtailId());
sinkJobConfig.setLogStoreId(sinkConfig.getLogstoreId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ private void putCommonData(Map<String, Object> dataMap) {
dataMap.putIfAbsent(LOG_STREAM_SPACE_ID, sinkJobConfig.getLogSpaceId());
dataMap.putIfAbsent(LOG_STREAM_STORE_ID, sinkJobConfig.getLogStoreId());
dataMap.putIfAbsent(LOG_STREAM_TAIL_ID, sinkJobConfig.getLogTailId());
dataMap.putIfAbsent(DEPLOY_SPACE, sinkJobConfig.getDeploySpace());
}

private void sendMessage(Map<String, Object> dataMap) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ public class SinkJobConfig extends LogConfig {
*/
private String jobType;
private String consumerGroup;
private String deploySpace;
}

0 comments on commit c55f162

Please sign in to comment.