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

Modify the logic that converts the parsing environment to flags. #2037

Merged
merged 18 commits into from
Jan 15, 2025

Conversation

quzard
Copy link
Collaborator

@quzard quzard commented Jan 14, 2025

  1. ilogtail时代gflag不进行变化例如logtail_profile_aliuid,ilogtail_discard_interval
  2. LoongCollector时代gflag均不佳前缀例如loongcollector_conf_dir改为conf_dir
  3. 不保留gflag同名小写字母环境变量自动转flag的行为,只把留下重要的gflag本名变成7中的额外转换规则例如check_point_filename在文档中暴露,需要添加为额外转换规则,dirfile_stat_sleep从未暴露过,不再支持小写env。
  4. 保留原有特殊env转flag的行为。例如ALIYUN_LOGTAIL_WORKING_HOSTNAME,继续保留。
  5. go插件的env继续保留,若与C++原来就有同名env则必须配套增加LOONG_XXX的名字以统一兼容。Go系统参数不需要增加LOONG开头的名字,如GOGC、GOMEMLIMIT。
  6. 自动为gflag生成LOONG_upper(flag_name)环境变量转flag的行为
  7. 允许额外增加转换规则,包含3中的额外转换规则和4中比本地配置优先级更高的特殊env(这里逻辑保持不变即可)

@quzard quzard changed the title modi modify ParseEnvToFlags Jan 14, 2025
@quzard quzard changed the title modify ParseEnvToFlags Modify the logic that converts the parsing environment to flags. Jan 14, 2025
core/app_config/AppConfig.cpp Outdated Show resolved Hide resolved
core/app_config/AppConfig.cpp Outdated Show resolved Hide resolved
core/prometheus/PrometheusInputRunner.cpp Outdated Show resolved Hide resolved
core/app_config/AppConfig.cpp Outdated Show resolved Hide resolved
plugin_main/plugin_export.go Show resolved Hide resolved
pkg/flags/flags.go Outdated Show resolved Hide resolved
pkg/flags/flags.go Show resolved Hide resolved
pkg/flags/flags.go Outdated Show resolved Hide resolved
@quzard quzard merged commit a605b1c into alibaba:main Jan 15, 2025
15 checks passed
quzard added a commit that referenced this pull request Jan 16, 2025
@henryzhx8 henryzhx8 added the enhancement Feature enhancement label Jan 26, 2025
@henryzhx8 henryzhx8 added this to the v3.0 milestone Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants