Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization of the self-monitoring metrics architecture for Go (Golang) plugin modules and unified output of metrics with C++ modules. #1290

Merged
merged 42 commits into from
Jan 23, 2024

Conversation

linrunqi08
Copy link
Collaborator

@linrunqi08 linrunqi08 commented Dec 27, 2023

  1. golang部分指标基本沿用原定义pkg/pipeline/self_metric.go
  2. pkg/pipeline/context.go 中新增MetricRecord数据结构,概念对齐C++的指标结构
  3. golang插件指标实现,主要看pluginmanager/processor_wrapper.go,现在调用processor插件,会统一经过processor_wrapper
  4. MetricRecord会从processor_wrapper中生成,然后set到context中,具体的processor会在init的时候从context中把MetricRecord拿出来,这里的实现依赖的是单个LogstoreConfig的所有插件是单线程,顺序init的,否则该实现会有问题(现在的实现不需要改接口定义)
  5. plugin_main/plugin_export.go定义了Cgo接口,go插件的指标数据通过Cgo接口一次返回,返回的数据结构为[]map[string]string. core/monitor/MetricExportor.cpp文件需要重点review内存释放逻辑

@linrunqi08 linrunqi08 changed the title Feature/taiye/add go plugin metric unify go plugin metric export Dec 27, 2023
@linrunqi08 linrunqi08 changed the title unify go plugin metric export Optimization of the self-monitoring metrics architecture for Go (Golang) plugin modules and unified output of metrics with C++ modules. Dec 29, 2023
plugins/processor/encrypt/processor_encrypt.go Outdated Show resolved Hide resolved
plugins/processor/encrypt/processor_encrypt.go Outdated Show resolved Hide resolved
pluginmanager/context_imp.go Show resolved Hide resolved
pluginmanager/self_telemetry_statistics.go Outdated Show resolved Hide resolved
plugins/input/rdb/rdb.go Outdated Show resolved Hide resolved
pluginmanager/flusher_wrapper.go Outdated Show resolved Hide resolved
pluginmanager/processor_wrapper.go Outdated Show resolved Hide resolved
pluginmanager/plugin_runner_helper.go Outdated Show resolved Hide resolved
core/monitor/MetricExportor.cpp Outdated Show resolved Hide resolved
core/monitor/MetricExportor.cpp Show resolved Hide resolved
pluginmanager/processor_wrapper.go Outdated Show resolved Hide resolved
pluginmanager/context_imp.go Outdated Show resolved Hide resolved
@linrunqi08 linrunqi08 force-pushed the feature/taiye/add_go_plugin_metric branch from 2f01470 to de51063 Compare January 9, 2024 04:15
@linrunqi08 linrunqi08 force-pushed the feature/taiye/add_go_plugin_metric branch from fe48d07 to 20480fe Compare January 16, 2024 01:55
core/go_pipeline/LogtailPlugin.cpp Show resolved Hide resolved
plugins/input/mysql/mysql.go Show resolved Hide resolved
core/go_pipeline/LogtailPlugin.cpp Outdated Show resolved Hide resolved
core/go_pipeline/LogtailPlugin.cpp Outdated Show resolved Hide resolved
core/monitor/MetricExportor.cpp Show resolved Hide resolved
core/pipeline/Pipeline.cpp Outdated Show resolved Hide resolved
core/pipeline/Pipeline.cpp Show resolved Hide resolved
pluginmanager/aggregator_wrapper_v1.go Show resolved Hide resolved
pluginmanager/logstore_config.go Show resolved Hide resolved
pkg/pipeline/context.go Outdated Show resolved Hide resolved
pluginmanager/logstore_config.go Outdated Show resolved Hide resolved
pluginmanager/logstore_config.go Outdated Show resolved Hide resolved
core/pipeline/Pipeline.cpp Show resolved Hide resolved
pluginmanager/logstore_config.go Outdated Show resolved Hide resolved
pluginmanager/logstore_config_test.go Outdated Show resolved Hide resolved
@linrunqi08 linrunqi08 merged commit 476ac70 into 1.8 Jan 23, 2024
17 checks passed
@yyuuttaaoo yyuuttaaoo added enhancement Feature enhancement feature request New feature request and removed enhancement Feature enhancement labels Mar 27, 2024
@yyuuttaaoo yyuuttaaoo added this to the v1.8 milestone Mar 27, 2024
@linrunqi08 linrunqi08 deleted the feature/taiye/add_go_plugin_metric branch May 20, 2024 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants