Skip to content

Commit

Permalink
lib: cprofiles addition
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich committed Nov 12, 2024
1 parent 58cc2d5 commit 83ebc11
Show file tree
Hide file tree
Showing 60 changed files with 9,043 additions and 1 deletion.
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ option(FLB_ENFORCE_ALIGNMENT "Enable limited platform specific aligned memory
# Native Metrics Support (cmetrics)
option(FLB_METRICS "Enable metrics support" Yes)

# Native Profiules Support (cprofiles)
option(FLB_PROFILES "Enable profiles support" Yes)

# Proxy Plugins
option(FLB_PROXY_GO "Enable Go plugins support" Yes)

Expand Down Expand Up @@ -257,6 +260,7 @@ if(FLB_DEV)
set(FLB_TRACE On)
set(FLB_CHUNK_TRACE On)
set(FLB_METRICS On)
set(FLB_PROFILES On)
set(FLB_IN_EVENT_TEST On)
set(FLB_HTTP_SERVER On)
set(FLB_HTTP_CLIENT_DEBUG On)
Expand Down Expand Up @@ -431,7 +435,7 @@ endif()
set(WITH_SYSTEM_MALLOC 1 CACHE BOOL "Use system memory allocator")

# Headers: required headers by bundled libraries, this act as a helper for
# CFL, Ctraces, CMetrics and fluent-otel-proto
# CFL, Ctraces, CMetrics, CProfiles and fluent-otel-proto
#
# Note: any check_c_source_compiles() cmake function might require this to
# work.
Expand All @@ -447,6 +451,7 @@ add_subdirectory(${FLB_PATH_LIB_CFL} EXCLUDE_FROM_ALL)

# fluent-otel-proto
FLB_OPTION(FLUENT_PROTO_METRICS ON)
FLB_OPTION(FLUENT_PROTO_PROFILES ON)
add_subdirectory(${FLB_PATH_LIB_FLUENT_OTEL} EXCLUDE_FROM_ALL)

# MsgPack options
Expand Down Expand Up @@ -493,6 +498,9 @@ add_subdirectory(${FLB_PATH_LIB_CMETRICS} EXCLUDE_FROM_ALL)
# CTraces
add_subdirectory(${FLB_PATH_LIB_CTRACES} EXCLUDE_FROM_ALL)

# CProfiles
add_subdirectory(${FLB_PATH_LIB_CPROFILES} EXCLUDE_FROM_ALL)

# Nghttp2 options
if(FLB_PREFER_SYSTEM_LIB_NGHTTP2)
find_package(PkgConfig)
Expand Down Expand Up @@ -602,6 +610,11 @@ if(FLB_METRICS)
FLB_DEFINITION(FLB_HAVE_METRICS)
endif()

# Profiles
if(FLB_PROFILES)
FLB_DEFINITION(FLB_HAVE_PROFILES)
endif()

# WASM
if(FLB_WASM)
if (FLB_SYSTEM_LINUX)
Expand Down
1 change: 1 addition & 0 deletions cmake/headers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ include_directories(
${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_SNAPPY}
${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_CMETRICS}/include
${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_CTRACES}/include
${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_CPROFILES}/include
${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_RING_BUFFER}/lwrb/src/include

${CMAKE_CURRENT_BINARY_DIR}/${FLB_PATH_LIB_JANSSON}/include
Expand Down
1 change: 1 addition & 0 deletions cmake/libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set(FLB_PATH_LIB_CFL "lib/cfl")
set(FLB_PATH_LIB_FLUENT_OTEL "lib/fluent-otel-proto")
set(FLB_PATH_LIB_CMETRICS "lib/cmetrics")
set(FLB_PATH_LIB_CTRACES "lib/ctraces")
set(FLB_PATH_LIB_CPROFILES "lib/cprofiles")

set(FLB_PATH_LIB_CO "lib/flb_libco")
set(FLB_PATH_LIB_RBTREE "lib/rbtree")
Expand Down
6 changes: 6 additions & 0 deletions lib/cprofiles/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "lib/cfl"]
path = lib/cfl
url = https://github.com/fluent/cfl
[submodule "lib/fluent-otel-proto"]
path = lib/fluent-otel-proto
url = https://github.com/fluent/fluent-otel-proto
Loading

0 comments on commit 83ebc11

Please sign in to comment.