fluent-bit: add support for lua filter

this allows us to add custom records, for example, for converting
kernel monotonic timestamps to UTC format timestamps
This commit is contained in:
Mohd Husaam Mehdi 2025-05-16 21:14:03 +05:30 committed by Husaam Mehdi
parent 499f77d498
commit 9efca3c299
2 changed files with 26 additions and 2 deletions

View file

@ -55,7 +55,7 @@ CMAKE_OPTIONS+= \
-DFLB_BACKTRACE=No \
-DFLB_KAFKA=No \
-DFLB_WASM=No \
-DFLB_LUAJIT=No
-DFLB_LUAJIT=Yes
# In plugins
CMAKE_OPTIONS += \
@ -103,10 +103,10 @@ CMAKE_OPTIONS += \
# Filter options
CMAKE_OPTIONS += \
-DFLB_FILTER_LUA=Yes \
-DFLB_FILTER_AWS=No \
-DFLB_FILTER_ECS=No \
-DFLB_FILTER_KUBERNETES=No \
-DFLB_FILTER_LUA=No \
-DFLB_FILTER_NEST=No \
-DFLB_FILTER_RECORD_MODIFIER=No \
-DFLB_FILTER_THROTTLE=No \

View file

@ -0,0 +1,24 @@
diff --git a/lib/luajit-cmake/LuaJIT.cmake b/lib/luajit-cmake/LuaJIT.cmake
index 4ad1ef565..c0dee5830 100644
--- a/lib/luajit-cmake/LuaJIT.cmake
+++ b/lib/luajit-cmake/LuaJIT.cmake
@@ -426,10 +426,17 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)
-if (GIT_EXISTENCE EQUAL 0)
+execute_process(
+ COMMAND git rev-parse --is-inside-work-tree
+ RESULT_VARIABLE GIT_IN_REPOSITORY
+ OUTPUT_VARIABLE GIT_IS_IN_REPOSITORY
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
+if ((GIT_EXISTENCE EQUAL 0) AND (GIT_IN_REPOSITORY EQUAL 0))
message(STATUS "Using Git: ${GIT_VERSION}")
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/luajit_relver.txt
- COMMAND git show -s --format=${GIT_FORMAT} > ${CMAKE_CURRENT_BINARY_DIR}/luajit_relver.txt
+ COMMAND git -c log.showSignature=false show -s --format=${GIT_FORMAT} > ${CMAKE_CURRENT_BINARY_DIR}/luajit_relver.txt
WORKING_DIRECTORY ${LUAJIT_DIR}
)
else()