Skip to content

Commit

Permalink
fix: Fixed the issue of missing Profile data when the Pipeline contai…
Browse files Browse the repository at this point in the history
…ns a Golang plugin. (#1521)

* fix profile data

* add comments
  • Loading branch information
linrunqi08 authored Jun 7, 2024
1 parent 1ec0489 commit edb7ff0
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions core/processor/daemon/LogProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,10 @@ void* LogProcess::ProcessLoop(int32_t threadNo) {
"project", projectName)("logstore", category)("filename", convertedPath));
}
}
}

LogFileProfiler::GetInstance()->AddProfilingData(pipeline->Name(),
// 统计信息需要放在最外面,确保Pipeline在各种条件下,都能统计到
LogFileProfiler::GetInstance()->AddProfilingData(pipeline->Name(),
pipeline->GetContext().GetRegion(),
projectName,
category,
Expand All @@ -424,14 +426,13 @@ void* LogProcess::ProcessLoop(int32_t threadNo) {
profile.historyFailures,
0,
""); // TODO: I don't think errorLine is useful
LOG_DEBUG(
sLogger,
("project", projectName)("logstore", category)("filename", convertedPath)("read_bytes", readBytes)(
"split_lines", profile.splitLines)("parse_failures", profile.parseFailures)(
"parse_time_failures", profile.parseTimeFailures)(
"regex_match_failures", profile.regexMatchFailures)("history_failures",
profile.historyFailures));
}
LOG_DEBUG(
sLogger,
("project", projectName)("logstore", category)("filename", convertedPath)("read_bytes", readBytes)(
"split_lines", profile.splitLines)("parse_failures", profile.parseFailures)(
"parse_time_failures", profile.parseTimeFailures)(
"regex_match_failures", profile.regexMatchFailures)("history_failures",
profile.historyFailures));
logGroupList.clear();
}
}
Expand Down

0 comments on commit edb7ff0

Please sign in to comment.