원클릭으로
project-knowledge
LoongCollector project knowledge: architecture, terminology, codebase map, and coding standards (C++/Go).
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
LoongCollector project knowledge: architecture, terminology, codebase map, and coding standards (C++/Go).
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
在进行 Code Review 时,使用这个技能对 LoongCollector 变更进行安全导向、架构一致性优先的深度代码评审。
按 Conventional Commits 规范编写提交信息。在创建 git commit 时使用。
编译 LoongCollector C++ 与 Go 组件。涉及构建、单元测试或镜像时使用。
Design document writing conventions. Use when writing or reviewing technical design documents.
LoongCollector E2E Testing Framework Development Guide. Use this rule when you need to understand E2E testing framework architecture, develop new test behavior functions, or extend testing capabilities. Contains detailed BDD testing framework usage, test behavior function development and registration workflows, and comprehensive reference of existing testing capabilities. Example: When adding custom test behaviors for new plugins, use this rule to understand how to write and register new test functions. Example: When developing E2E tests, use this rule to understand the e2e framework.
E2E Testing Standards Guide. Use this rule when you need to write or execute E2E tests, including test naming conventions, test workflows, and test behavior templates. This rule should be used for end-to-end integration testing scenarios to ensure test standardization and maintainability. Example: When writing new E2E tests, use this rule to ensure proper test format and workflow compliance.
| name | project-knowledge |
| description | LoongCollector project knowledge: architecture, terminology, codebase map, and coding standards (C++/Go). |
The LoongCollector architecture is based on a plugin system with the following key components:
Core Application: Main entry point in core/logtail.cpp, initializes Application class in core/application/Application.cpp. Follows singleton pattern, manages overall lifecycle.
Plugin System: Supports plugins for data collection, processing, and flushing:
Pipeline Management: Collection pipelines managed by CollectionPipelineManager handle data flow from inputs through processors to flushers.
Configuration: Supports both local and remote configuration management with watchers that monitor for configuration changes.
Queuing System: Implements various queue types including bounded queues, circular queues, and exactly-once delivery queues for reliable data transmission.
Monitoring: Built-in monitoring and metrics collection for tracking the collector's own performance and health.
core/ # Core C++ code
plugin/ # Plugin system
input/ # Data collection input plugins
processor/ # Data processing plugins
flusher/ # Data output plugins (SLS, file, etc.)
collection_pipeline/ # Main pipeline flow (queue, batch, serialization)
config/ # Configuration (loading, providers, feedback)
provider/ # Config providers (Enterprise, Legacy)
common/ # Common utilities, data structures, network, string, crypto
monitor/ # Monitoring, metrics collection, alerting
logger/ # Logging system
checkpoint/ # Checkpoint, state management
app_config/ # Global configuration
models/ # Core data structures (events, logs, metrics)
parser/ # Log parsers
task_pipeline/ # Task scheduling
go_pipeline/ # Go plugin integration
ebpf/ # eBPF collection and plugins
host_monitor/ # Host-level monitoring
shennong/ # Shennong metrics
prometheus/ # Prometheus collection
file_server/ # File collection and management
container_manager/ # Container environment management
application/ # Main application entry
protobuf/ # Protobuf protocol definitions
metadata/ # K8s and other metadata collection
constants/ # Constants
tools/ # Internal utility scripts
unittest/ # Unit tests
legacy_test/ # Historical test cases
pkg/ # Go packages
helper/ # Go helper functions
containercenter/ # Go container-related functions
plugin_main/ # Plugin main entry
pluginmanager/ # Go plugin manager (lifecycle, registration)
plugins/ # Go plugin packages
input/ # Go input plugins (docker, etc.)
processor/ # Go processor plugins
flusher/ # Go flusher plugins
aggregator/ # Go aggregator plugins
extension/ # Go extension plugins
all/ # Plugin registration and init
test/ # Go plugin tests
test/ # Integration tests
e2e/ # E2E test cases (open source Go plugins)
e2e_enterprise/ # E2E enterprise test cases (host + K8s)
docs/ # Project documentation
scripts/ # Build, deploy, test scripts
docker/ # Docker-related files
rpm/ # RPM packaging
external/ # External dependencies
spdlog - Loggingrapidjson - JSON parsinggtest, gmockprotobufre2cityhashjsoncpp, yamlcpplz4, zlib, zstdcurl, ssl, cryptoboost, gflags, leveldb, uuidtcmalloc (optional)| Term | Description |
|---|---|
| LoongCollector | The observability data collection agent (formerly iLogtail) |
| Pipeline | A data processing chain: Input -> Processor(s) -> Flusher |
| Plugin | A modular component that performs specific data operations |
| Input Plugin | Collects data from a source (file, network, metric, etc.) |
| Processor Plugin | Transforms data (parse, filter, enrich, etc.) |
| Flusher Plugin | Sends data to a destination (SLS, stdout, Prometheus, etc.) |
| Config | Collection configuration defining pipeline behavior |
| Checkpoint | Persistent state tracking for exactly-once delivery |
| Runner | Execution wrapper for a specific plugin instance |
| Queue | Data buffer between pipeline stages |
| Batch | Group of events processed/sent together |
| SLS | Alibaba Cloud Simple Log Service |
| eBPF | Extended Berkeley Packet Filter (kernel tracing) |
| SPL | Structured Processing Language |
| Path | Purpose |
|---|---|
core/logtail.cpp | Main entry point |
core/application/Application.cpp | Application singleton, lifecycle management |
core/collection_pipeline/CollectionPipelineManager.cpp | Pipeline lifecycle |
core/collection_pipeline/CollectionPipeline.cpp | Pipeline execution |
core/runner/ProcessorRunner.cpp | Processor execution |
core/runner/FlusherRunner.cpp | Flusher execution |
core/config/watcher/PipelineConfigWatcher.cpp | Config change detection |
core/file_server/FileServer.cpp | File collection management |
core/file_server/checkpoint/CheckpointManagerV2.cpp | Exactly-once checkpoint |
mUserId)kMaxSendBufferSize)std::unique_ptr / std::shared_ptr for memory managementstd::optional, std::variant, std::any for type-safe alternativesconstexpr and const for compile-time computationsstd::string_view for read-only string operationsstd::runtime_error, std::invalid_argument)std::move for move semantics<algorithm> (e.g., std::sort, std::for_each)std::array or std::vector over raw arraysstatic_cast, dynamic_cast, reinterpret_castenum class for strongly typed enumerationsfmt.Errorf with %w for error wrappingtesting package