Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 5 additions & 21 deletions .github/workflows/boost_log.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,17 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: opentelemetry-cpp-contrib
# submodules: "recursive"
- name: checkout opentelemetry-cpp
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: "open-telemetry/opentelemetry-cpp"
ref: "v1.19.0"
path: "opentelemetry-cpp"
submodules: "recursive"
- name: setup dependencies
working-directory: opentelemetry-cpp-contrib/instrumentation/boost_log
working-directory: instrumentation/boost_log
run: |
sudo apt update -y
xargs -a apt-packages.txt sudo apt install -y --no-install-recommends --no-install-suggests
- name: build opentelemetry-cpp
run: |
mkdir -p "${GITHUB_WORKSPACE}/opentelemetry-cpp/build"
cd "${GITHUB_WORKSPACE}/opentelemetry-cpp/build"
cmake .. -G Ninja -DBUILD_TESTING=OFF -DWITH_BENCHMARK=OFF -DOPENTELEMETRY_INSTALL=ON
cmake --build . -j$(nproc)
cmake --install . --prefix="${GITHUB_WORKSPACE}/sandbox"
- name: build boost_log contrib
working-directory: instrumentation/boost_log
run: |
mkdir -p "${GITHUB_WORKSPACE}/boost_log/build"
cd "${GITHUB_WORKSPACE}/boost_log/build"
cmake ../../opentelemetry-cpp-contrib/instrumentation/boost_log \
mkdir -p "build"
cd "build"
cmake .. \
-G Ninja \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/sandbox" \
-DBUILD_TESTING=ON \
Expand Down
24 changes: 4 additions & 20 deletions .github/workflows/geneva_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,16 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: "otel_cpp_contrib"
- name: checkout otel cpp
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: "open-telemetry/opentelemetry-cpp"
ref: "v1.23.0"
path: "otel_cpp"
submodules: "recursive"
- name: setup
working-directory: otel_cpp_contrib/exporters/geneva
working-directory: exporters/geneva
run: |
sudo apt update -y
xargs -a apt-packages.txt sudo apt install -y --no-install-recommends --no-install-suggests
- name: run tests
working-directory: exporters/geneva
run: |
pushd "$GITHUB_WORKSPACE/otel_cpp"
sudo ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release --packages "googletest;benchmark"
popd
mkdir -p "$GITHUB_WORKSPACE/otel_cpp/build"
cd "$GITHUB_WORKSPACE/otel_cpp/build"
cmake .. -DOPENTELEMETRY_INSTALL=ON
cmake --build . -j$(nproc)
cmake --install . --prefix "$HOME/prebuilt-otel"
mkdir -p "$GITHUB_WORKSPACE/otel_cpp_contrib/exporters/geneva/build"
cd "$GITHUB_WORKSPACE/otel_cpp_contrib/exporters/geneva/build"
mkdir -p "build"
cd "build"
cmake .. "-DCMAKE_PREFIX_PATH=$HOME/prebuilt-otel" \
-DBUILD_TESTING=ON -DWITH_EXAMPLES=ON
cmake --build . -j$(nproc)
Expand Down
22 changes: 4 additions & 18 deletions .github/workflows/glog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ jobs:
with:
persist-credentials: false
path: opentelemetry-cpp-contrib
- name: checkout opentelemetry-cpp
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: "open-telemetry/opentelemetry-cpp"
ref: "v1.19.0"
path: "opentelemetry-cpp"
submodules: "recursive"
- name: setup dependencies
working-directory: opentelemetry-cpp-contrib/instrumentation/glog
run: |
Expand All @@ -55,18 +47,12 @@ jobs:
cmake .. -G Ninja
cmake --build . -j$(nproc)
cmake --install . --prefix="${GITHUB_WORKSPACE}/sandbox"
- name: build opentelemetry-cpp
run: |
mkdir -p "${GITHUB_WORKSPACE}/opentelemetry-cpp/build"
cd "${GITHUB_WORKSPACE}/opentelemetry-cpp/build"
cmake .. -G Ninja -DBUILD_TESTING=OFF -DWITH_BENCHMARK=OFF -DOPENTELEMETRY_INSTALL=ON
cmake --build . -j$(nproc)
cmake --install . --prefix="${GITHUB_WORKSPACE}/sandbox"
- name: build instrumentation/glog contrib
working-directory: opentelemetry-cpp-contrib/instrumentation/glog
run: |
mkdir -p "${GITHUB_WORKSPACE}/instrumentation-glog/build"
cd "${GITHUB_WORKSPACE}/instrumentation-glog/build"
cmake ../../opentelemetry-cpp-contrib/instrumentation/glog \
mkdir -p "build"
cd "build"
cmake .. \
-G Ninja \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/sandbox" \
-DBUILD_TESTING=ON \
Expand Down
25 changes: 5 additions & 20 deletions .github/workflows/log4cxx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,17 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: opentelemetry-cpp-contrib
- name: checkout opentelemetry-cpp
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: "open-telemetry/opentelemetry-cpp"
ref: "v1.19.0"
path: "opentelemetry-cpp"
submodules: "recursive"
- name: setup dependencies
working-directory: opentelemetry-cpp-contrib/instrumentation/log4cxx
working-directory: instrumentation/log4cxx
run: |
sudo apt update -y
xargs -a apt-packages.txt sudo apt install -y --no-install-recommends --no-install-suggests
- name: build opentelemetry-cpp
run: |
mkdir -p "${GITHUB_WORKSPACE}/opentelemetry-cpp/build"
cd "${GITHUB_WORKSPACE}/opentelemetry-cpp/build"
cmake .. -G Ninja -DBUILD_TESTING=OFF -DWITH_BENCHMARK=OFF -DOPENTELEMETRY_INSTALL=ON
cmake --build . -j$(nproc)
cmake --install . --prefix="${GITHUB_WORKSPACE}/sandbox"
- name: build instrumentation/log4cxx contrib
working-directory: instrumentation/log4cxx
run: |
mkdir -p "${GITHUB_WORKSPACE}/instrumentation-log4cxx/build"
cd "${GITHUB_WORKSPACE}/instrumentation-log4cxx/build"
cmake ../../opentelemetry-cpp-contrib/instrumentation/log4cxx \
mkdir -p "build"
cd "build"
cmake .. \
-G Ninja \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/sandbox" \
-DBUILD_TESTING=ON \
Expand Down
25 changes: 5 additions & 20 deletions .github/workflows/spdlog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,17 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: opentelemetry-cpp-contrib
- name: checkout opentelemetry-cpp
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: "open-telemetry/opentelemetry-cpp"
ref: "v1.24.0"
path: "opentelemetry-cpp"
submodules: "recursive"
- name: setup dependencies
working-directory: opentelemetry-cpp-contrib/instrumentation/spdlog
working-directory: instrumentation/spdlog
run: |
sudo apt update -y
xargs -a apt-packages.txt sudo apt install -y --no-install-recommends --no-install-suggests
- name: build opentelemetry-cpp
run: |
mkdir -p "${GITHUB_WORKSPACE}/opentelemetry-cpp/build"
cd "${GITHUB_WORKSPACE}/opentelemetry-cpp/build"
cmake .. -G Ninja -DBUILD_TESTING=OFF -DWITH_BENCHMARK=OFF -DOPENTELEMETRY_INSTALL=ON
cmake --build . -j$(nproc)
cmake --install . --prefix="${GITHUB_WORKSPACE}/sandbox"
- name: build instrumentation/spdlog contrib
working-directory: instrumentation/spdlog
run: |
mkdir -p "${GITHUB_WORKSPACE}/instrumentation-spdlog/build"
cd "${GITHUB_WORKSPACE}/instrumentation-spdlog/build"
cmake ../../opentelemetry-cpp-contrib/instrumentation/spdlog \
mkdir -p "build"
cd "build"
cmake .. \
-G Ninja \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/sandbox" \
-DBUILD_TESTING=ON \
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/user_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,17 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: opentelemetry-cpp-contrib
submodules: "recursive"
- name: checkout opentelemetry-cpp
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: "open-telemetry/opentelemetry-cpp"
ref: "v1.23.0"
path: "opentelemetry-cpp"
submodules: "recursive"
- name: setup dependencies
working-directory: opentelemetry-cpp-contrib/exporters/user_events
working-directory: exporters/user_events
run: |
sudo apt update -y
xargs -a apt-packages.txt sudo apt install -y --no-install-recommends --no-install-suggests
- name: run tests
working-directory: exporters/user_events
run: |
mkdir -p "$GITHUB_WORKSPACE/opentelemetry-cpp/build"
cd "$GITHUB_WORKSPACE/opentelemetry-cpp/build"
cmake .. -G Ninja -D OPENTELEMETRY_EXTERNAL_COMPONENT_PATH=$GITHUB_WORKSPACE/opentelemetry-cpp-contrib/exporters/user_events -D WITH_OTLP_HTTP=ON
mkdir -p "build"
cd "build"
cmake .. -G Ninja -D OPENTELEMETRY_EXTERNAL_COMPONENT_PATH=$GITHUB_WORKSPACE/exporters/user_events -D WITH_OTLP_HTTP=ON
cmake --build . -j$(nproc)
ctest -j1 --output-on-failure
16 changes: 15 additions & 1 deletion exporters/geneva-trace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(MAIN_PROJECT ON)
endif()

include(FetchContent)

if(MAIN_PROJECT)
option(WITH_EXAMPLES "Build examples" ON)

FetchContent_Declare(
opentelemetry-cpp
GIT_REPOSITORY https://github.com/open-telemetry/opentelemetry-cpp.git
GIT_TAG b9cf499ff5715433848b316059714b5c59af1f2c # v1.21.0
)

FetchContent_MakeAvailable(opentelemetry-cpp)
endif()

add_library(opentelemetry_exporter_geneva_trace INTERFACE)
Expand All @@ -30,6 +40,10 @@ set_target_properties(
opentelemetry_exporter_geneva_logs
PROPERTIES EXPORT_NAME opentelemetry_exporter_geneva_logs)

if(MAIN_PROJECT)
target_link_libraries(opentelemetry_exporter_geneva_logs
PUBLIC opentelemetry-cpp::api)
endif()

if(WITH_EXAMPLES)
include_directories(include)
Expand Down Expand Up @@ -65,4 +79,4 @@ if(OPENTELEMETRY_INSTALL)
PATTERN
"*.h")
endif()
endif()
endif()
1 change: 0 additions & 1 deletion exporters/geneva-trace/third_party/opentelemetry-cpp
Submodule opentelemetry-cpp deleted from b9cf49
14 changes: 10 additions & 4 deletions exporters/geneva/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.12)
#
set(MAIN_PROJECT OFF)

include(FetchContent)

if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
project(opentelemetry-geneva-metrics)
set(MAIN_PROJECT ON)
Expand All @@ -17,7 +19,13 @@ endif()

add_definitions(-DHAVE_CONSOLE_LOG)
if(MAIN_PROJECT)
find_package(opentelemetry-cpp REQUIRED)
FetchContent_Declare(
opentelemetry-cpp
GIT_REPOSITORY https://github.com/open-telemetry/opentelemetry-cpp.git
GIT_TAG b9cf499ff5715433848b316059714b5c59af1f2c # v1.21.0
)

FetchContent_MakeAvailable(opentelemetry-cpp)
endif()

include_directories(include)
Expand Down Expand Up @@ -49,10 +57,8 @@ set_target_properties(
PROPERTIES EXPORT_NAME opentelemetry_exporter_geneva_metrics)

if(MAIN_PROJECT)
target_include_directories(opentelemetry_exporter_geneva_metrics
PRIVATE ${OPENTELEMETRY_CPP_INCLUDE_DIRS})
target_link_libraries(opentelemetry_exporter_geneva_metrics
PUBLIC ${OPENTELEMETRY_CPP_LIBRARIES})
PUBLIC opentelemetry-cpp::api)
else()
target_link_libraries(opentelemetry_exporter_geneva_metrics
PUBLIC opentelemetry_metrics opentelemetry_resources opentelemetry_common)
Expand Down
3 changes: 3 additions & 0 deletions exporters/geneva/apt-packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ wget
git
valgrind
lcov
libbenchmark-dev
libgmock-dev
libgtest-dev
38 changes: 18 additions & 20 deletions exporters/user_events/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ if(MAIN_PROJECT)
find_package(Protobuf REQUIRED)
find_package(CURL REQUIRED)
find_package(nlohmann_json REQUIRED)
find_package(opentelemetry-cpp REQUIRED)

FetchContent_Declare(
opentelemetry-cpp
GIT_REPOSITORY https://github.com/open-telemetry/opentelemetry-cpp.git
GIT_TAG ea1f0d61ce5baa5584b097266bf133d1f31e3607 # v1.23.0
)

FetchContent_MakeAvailable(opentelemetry-cpp)
endif()

if(BUILD_TRACEPOINTS)
Expand Down Expand Up @@ -54,10 +61,8 @@ target_compile_definitions(opentelemetry_exporter_user_events_logs
PUBLIC HAVE_CONSOLE_LOG HAVE_LOGS_PREVIEW)

if(MAIN_PROJECT)
target_include_directories(opentelemetry_exporter_user_events_logs
PRIVATE ${OPENTELEMETRY_CPP_INCLUDE_DIRS})
target_link_libraries(opentelemetry_exporter_user_events_logs
PUBLIC ${OPENTELEMETRY_CPP_LIBRARIES})
PUBLIC opentelemetry-cpp::api)
else()
target_link_libraries(
opentelemetry_exporter_user_events_logs
Expand All @@ -76,11 +81,9 @@ target_compile_features(opentelemetry_exporter_user_events_metrics
PRIVATE cxx_std_17)

if(MAIN_PROJECT)
target_include_directories(opentelemetry_exporter_user_events_metrics
PRIVATE ${OPENTELEMETRY_CPP_INCLUDE_DIRS})
target_link_libraries(
opentelemetry_exporter_user_events_metrics
PUBLIC ${OPENTELEMETRY_CPP_LIBRARIES} tracepoint protobuf::libprotobuf)
PUBLIC opentelemetry-cpp::api tracepoint protobuf::libprotobuf)
# TODO: link to opentelemetry_otlp_recordable
else()
target_link_libraries(
Expand Down Expand Up @@ -131,9 +134,10 @@ if(WITH_BENCHMARK)
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG 192ef10025eb2c4cdd392bc502f0c852196baa48 # v1.9.5
)
FetchContent_MakeAvailable(benchmark)
add_executable(user_events_logger_benchmark benchmark/logger_benchmark.cc)
target_link_libraries(
user_events_logger_benchmark benchmark::benchmark ${CMAKE_THREAD_LIBS_INIT}
user_events_logger_benchmark benchmark::benchmark
${CMAKE_THREAD_LIBS_INIT} opentelemetry_logs
opentelemetry_exporter_user_events_logs)
endif()
Expand Down Expand Up @@ -162,16 +166,10 @@ if(MAIN_PROJECT)
PATTERN "*.h")
else()
otel_add_component(
COMPONENT
exporters_user_events
TARGETS
opentelemetry_exporter_user_events_logs
opentelemetry_exporter_user_events_metrics
FILES_DIRECTORY
"include/opentelemetry/exporters/user_events"
FILES_DESTINATION
"include/opentelemetry/exporters"
COMPONENT exporters_user_events
TARGETS opentelemetry_exporter_user_events_logs opentelemetry_exporter_user_events_metrics
FILES_DIRECTORY "include/opentelemetry/exporters/user_events"
FILES_DESTINATION "include/opentelemetry/exporters"
FILES_MATCHING
PATTERN
"*.h")
endif()
PATTERN "*.h")
endif()
4 changes: 4 additions & 0 deletions exporters/user_events/apt-packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ libssl-dev
libcurl4-openssl-dev
libprotobuf-dev
protobuf-compiler
nlohmann-json3-dev
libbenchmark-dev
libgmock-dev
libgtest-dev
Loading
Loading