Skip to content

Commit bec742d

Browse files
committed
1. push span/metrics自监控指标下移到NetworkObserverManager中
2. timeDiff替换成 KernelTimeNanoToUTC方法 3. 移除Periodical Event,在Timer Event Execute方法中主动PushNextEvent 4. eBPF Driver 中定义错误码 5. 采集配置中移除测试相关的配置 6. span和stringview 目录结构移动到 common 目录下
1 parent cbe16e6 commit bec742d

File tree

65 files changed

+503
-480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+503
-480
lines changed

core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ set(SUB_DIRECTORIES_LIST
126126
protobuf/sls protobuf/models
127127
file_server file_server/event file_server/event_handler file_server/event_listener file_server/reader file_server/polling
128128
prometheus prometheus/labels prometheus/schedulers prometheus/async prometheus/component
129-
ebpf ebpf/type/table ebpf/util ebpf/util/sampler ebpf/protocol/http ebpf/protocol ebpf/plugin/file_security ebpf/plugin/network_observer ebpf/plugin/process_security ebpf/plugin/network_security ebpf/plugin ebpf/observer ebpf/security
129+
ebpf ebpf/type ebpf/type/table ebpf/util ebpf/util/sampler ebpf/protocol/http ebpf/protocol ebpf/plugin/file_security ebpf/plugin/network_observer ebpf/plugin/process_security ebpf/plugin/network_security ebpf/plugin ebpf/observer ebpf/security
130130
parser
131131
host_monitor host_monitor/collector
132132
)

core/collection_pipeline/batch/BatchItem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
#include "collection_pipeline/batch/BatchStatus.h"
2424
#include "collection_pipeline/batch/BatchedEvents.h"
2525
#include "collection_pipeline/batch/FlushStrategy.h"
26+
#include "common/StringView.h"
2627
#include "models/PipelineEventGroup.h"
27-
#include "models/StringView.h"
2828

2929
namespace logtail {
3030

core/collection_pipeline/batch/BatchedEvents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#include <unordered_set>
2020
#include <vector>
2121

22+
#include "common/StringView.h"
2223
#include "models/PipelineEventGroup.h"
23-
#include "models/StringView.h"
2424

2525
namespace logtail {
2626

core/common/MachineInfoUtil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "json/value.h"
2424

2525
#include "AppConfig.h"
26-
#include "models/StringView.h"
26+
#include "common/StringView.h"
2727

2828
namespace logtail {
2929

File renamed without changes.

core/common/StringTools.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <string>
2828
#include <vector>
2929

30-
#include "models/StringView.h"
30+
#include "common/StringView.h"
3131

3232
namespace logtail {
3333

File renamed without changes.

core/common/TimeUtil.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,14 +428,12 @@ std::chrono::nanoseconds GetTimeDiffFromMonotonic() {
428428
#endif
429429
}
430430

431-
struct timespec KernelNanoTimeToUTC(uint64_t nano) {
432-
static std::chrono::nanoseconds diff = GetTimeDiffFromMonotonic();
433-
auto ts = std::chrono::nanoseconds(nano + diff.count());
431+
struct timespec KernelTimeNanoToUTC(uint64_t nano) {
432+
static auto diff = GetTimeDiffFromMonotonic().count();
433+
auto ts = std::chrono::nanoseconds(nano + diff);
434434
auto seconds = std::chrono::duration_cast<std::chrono::seconds>(ts);
435435
auto nanoseconds = std::chrono::duration_cast<std::chrono::nanoseconds>(ts - seconds);
436-
struct timespec res;
437-
res.tv_sec = seconds.count();
438-
res.tv_nsec = nanoseconds.count();
436+
struct timespec res = {seconds.count(), nanoseconds.count()};
439437
return res;
440438
}
441439

core/common/TimeUtil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ long GetTicksPerSecond();
101101

102102
std::chrono::nanoseconds GetTimeDiffFromMonotonic();
103103

104-
struct timespec KernelNanoTimeToUTC(uint64_t nano);
104+
struct timespec KernelTimeNanoToUTC(uint64_t nano);
105105

106106
} // namespace logtail

core/common/memory/SourceBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <list>
2020
#include <memory>
2121

22-
#include "models/StringView.h"
22+
#include "common/StringView.h"
2323

2424
namespace logtail {
2525

0 commit comments

Comments
 (0)