-
Notifications
You must be signed in to change notification settings - Fork 2k
build: add options for plugins at group granularity #12160
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,14 +3,63 @@ macro(DEFINE_OPTION option_name description default_value) | |
| if(FLB_MINIMAL) | ||
| set(temp_value OFF) | ||
| endif() | ||
| string(TOLOWER "${FLB_GROUP_OVERRIDE}" group_override) | ||
| if(NOT group_override STREQUAL "inherit") | ||
| set(temp_value ${FLB_GROUP_OVERRIDE}) | ||
| endif() | ||
|
|
||
| if(temp_value) | ||
| set(temp_value ON) | ||
| else() | ||
| set(temp_value OFF) | ||
| endif() | ||
|
|
||
| get_property(option_type CACHE ${option_name} PROPERTY TYPE) | ||
| if(option_type STREQUAL "UNINITIALIZED") | ||
| set(_FLB_PINNED_${option_name} ON CACHE INTERNAL "") | ||
| endif() | ||
|
|
||
| option(${option_name} "${description}" ${temp_value}) | ||
|
|
||
| if(NOT DEFINED _FLB_INHERITED_${option_name}) | ||
| set(_FLB_INHERITED_${option_name} "${${option_name}}" CACHE INTERNAL "") | ||
| else() | ||
| if(NOT _FLB_PINNED_${option_name} AND | ||
| NOT "${${option_name}}" STREQUAL "${_FLB_INHERITED_${option_name}}") | ||
| set(_FLB_PINNED_${option_name} ON CACHE INTERNAL "") | ||
| endif() | ||
| if(NOT _FLB_PINNED_${option_name} AND "${${option_name}}" STREQUAL "${_FLB_INHERITED_${option_name}}") | ||
| set(${option_name} ${temp_value} CACHE BOOL "${description}" FORCE) | ||
| endif() | ||
| set(_FLB_INHERITED_${option_name} ${temp_value} CACHE INTERNAL "") | ||
| endif() | ||
| endmacro() | ||
|
|
||
| # Add the FLB_MINIMAL option | ||
| option(FLB_MINIMAL "Enable minimal build configuration" No) | ||
|
|
||
| # Add options to enable/disable plugins at a group granularity | ||
| set(FLB_ALL_INPUTS "Inherit" CACHE STRING "Enable/Disable all Input plugins (On, Off, Inherit)") | ||
| set(FLB_ALL_PROCESSORS "Inherit" CACHE STRING "Enable/Disable all Processor plugins (On, Off, Inherit)") | ||
| set(FLB_ALL_FILTERS "Inherit" CACHE STRING "Enable/Disable all Filter plugins (On, Off, Inherit)") | ||
| set(FLB_ALL_OUTPUTS "Inherit" CACHE STRING "Enable/Disable all Output plugins (On, Off, Inherit)") | ||
|
Comment on lines
+42
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On Windows with the default AGENTS.md reference: AGENTS.md:L11-L15 Useful? React with 👍 / 👎. |
||
| set_property(CACHE FLB_ALL_INPUTS PROPERTY STRINGS "On;Off;Inherit") | ||
| set_property(CACHE FLB_ALL_PROCESSORS PROPERTY STRINGS "On;Off;Inherit") | ||
| set_property(CACHE FLB_ALL_FILTERS PROPERTY STRINGS "On;Off;Inherit") | ||
| set_property(CACHE FLB_ALL_OUTPUTS PROPERTY STRINGS "On;Off;Inherit") | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| foreach(group_option FLB_ALL_INPUTS FLB_ALL_PROCESSORS FLB_ALL_FILTERS FLB_ALL_OUTPUTS) | ||
| string(TOLOWER "${${group_option}}" group_value) | ||
| if(NOT group_value MATCHES "^(on|off|inherit)$") | ||
| message(FATAL_ERROR | ||
| "${group_option} must be one of On, Off or Inherit " | ||
| "(got '${${group_option}}')") | ||
| endif() | ||
| endforeach() | ||
|
|
||
| # Inputs (sources, data collectors) | ||
| # ================================= | ||
| set(FLB_GROUP_OVERRIDE ${FLB_ALL_INPUTS}) | ||
| DEFINE_OPTION(FLB_IN_BLOB "Enable Blob input plugin" ON) | ||
| DEFINE_OPTION(FLB_IN_CALYPTIA_FLEET "Enable Calyptia Fleet input plugin" ON) | ||
| DEFINE_OPTION(FLB_IN_COLLECTD "Enable Collectd input plugin" ON) | ||
|
|
@@ -70,6 +119,7 @@ DEFINE_OPTION(FLB_IN_EBPF "Enable Linux eBPF input plugin" | |
|
|
||
| # Processors | ||
| # ========== | ||
| set(FLB_GROUP_OVERRIDE ${FLB_ALL_PROCESSORS}) | ||
| DEFINE_OPTION(FLB_PROCESSOR_CONTENT_MODIFIER "Enable content modifier processor" ON) | ||
| DEFINE_OPTION(FLB_PROCESSOR_CUMULATIVE_TO_DELTA "Enable cumulative to delta metrics processor" ON) | ||
| DEFINE_OPTION(FLB_PROCESSOR_LABELS "Enable metrics label manipulation processor" ON) | ||
|
|
@@ -81,6 +131,7 @@ DEFINE_OPTION(FLB_PROCESSOR_TDA "Enable TDA processor" | |
|
|
||
| # Filters | ||
| # ======= | ||
| set(FLB_GROUP_OVERRIDE ${FLB_ALL_FILTERS}) | ||
| DEFINE_OPTION(FLB_FILTER_ALTER_SIZE "Enable alter_size filter" ON) | ||
| DEFINE_OPTION(FLB_FILTER_AWS "Enable aws filter" ON) | ||
| DEFINE_OPTION(FLB_FILTER_CHECKLIST "Enable checklist filter" ON) | ||
|
|
@@ -108,6 +159,7 @@ DEFINE_OPTION(FLB_FILTER_WASM "Enable WASM filter" | |
|
|
||
| # Outputs (destinations) | ||
| # ====================== | ||
| set(FLB_GROUP_OVERRIDE ${FLB_ALL_OUTPUTS}) | ||
| DEFINE_OPTION(FLB_OUT_AZURE "Enable Azure output plugin" ON) | ||
| DEFINE_OPTION(FLB_OUT_AZURE_BLOB "Enable Azure output plugin" ON) | ||
| DEFINE_OPTION(FLB_OUT_AZURE_KUSTO "Enable Azure Kusto output plugin" ON) | ||
|
|
@@ -156,3 +208,5 @@ DEFINE_OPTION(FLB_OUT_TCP "Enable TCP output plugin" | |
| DEFINE_OPTION(FLB_OUT_UDP "Enable UDP output plugin" ON) | ||
| DEFINE_OPTION(FLB_OUT_VIVO_EXPORTER "Enable Vivo exporter output plugin" ON) | ||
| DEFINE_OPTION(FLB_OUT_WEBSOCKET "Enable Websocket output plugin" ON) | ||
|
|
||
| unset(FLB_GROUP_OVERRIDE) | ||
Uh oh!
There was an error while loading. Please reload this page.