Skip to content

Commit 891dcf8

Browse files
committed
Allow custom GIT_TAG for OpenTelemetry.
1 parent 540107b commit 891dcf8

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ Various CMake options are available to customize the client/server SDK builds.
6666
| `LD_DYNAMIC_LINK_OPENSSL` | Whether OpenSSL is dynamically linked or not. | Off (static link) | N/A |
6767
| `LD_BUILD_REDIS_SUPPORT` | Whether the server-side Redis Source is built or not. | Off | N/A |
6868
| `LD_CURL_NETWORKING` | Enable CURL-based networking for all HTTP requests (SSE streams and event delivery). When OFF, Boost.Beast/Foxy is used instead. CURL must be available as a dependency when this option is ON. | Off | N/A |
69+
| `LD_BUILD_OTEL_SUPPORT` | Whether the server-side OpenTelemetry integration package is built or not. | Off | N/A |
70+
| `LD_BUILD_OTEL_FETCH_DEPS` | When building OpenTelemetry support, automatically fetch and configure OpenTelemetry dependencies via CMake FetchContent. This is useful for local development and CI. When OFF, you must provide OpenTelemetry yourself via `find_package`. | Off | `LD_BUILD_OTEL_SUPPORT` |
71+
| `LD_OTEL_CPP_VERSION` | Specifies the OpenTelemetry C++ SDK version (git tag or commit hash) to fetch when `LD_BUILD_OTEL_FETCH_DEPS` is enabled. Can be set to any valid git reference from the [opentelemetry-cpp repository](https://github.com/open-telemetry/opentelemetry-cpp). | `ea1f0d61ce5baa5584b097266bf133d1f31e3607` (v1.23.0) | `LD_BUILD_OTEL_FETCH_DEPS` |
6972

7073
> [!WARNING]
7174
> When building shared libraries C++ symbols are not exported, only the C API will be exported. This is because C++ does

libs/server-sdk-otel/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ endif ()
2424
# Option for local development and CI builds
2525
option(LD_BUILD_OTEL_FETCH_DEPS "Fetch OpenTelemetry dependencies for local/CI builds" OFF)
2626

27+
# Allow users to specify which version of OpenTelemetry to fetch
28+
# Default to v1.23.0 (commit ea1f0d61ce5baa5584b097266bf133d1f31e3607)
29+
set(LD_OTEL_CPP_VERSION "ea1f0d61ce5baa5584b097266bf133d1f31e3607" CACHE STRING "OpenTelemetry C++ SDK version (git tag or commit hash)")
30+
2731
if (LD_BUILD_OTEL_FETCH_DEPS)
2832
# For local development and CI: fetch OpenTelemetry with sensible defaults
2933
message("LaunchDarkly: fetching OpenTelemetry dependencies for local/CI build")
@@ -44,7 +48,7 @@ if (LD_BUILD_OTEL_FETCH_DEPS)
4448
FetchContent_Declare(
4549
opentelemetry-cpp
4650
GIT_REPOSITORY https://github.com/open-telemetry/opentelemetry-cpp.git
47-
GIT_TAG ea1f0d61ce5baa5584b097266bf133d1f31e3607 # v1.23.0
51+
GIT_TAG ${LD_OTEL_CPP_VERSION}
4852
)
4953
FetchContent_MakeAvailable(opentelemetry-cpp)
5054
else()

0 commit comments

Comments
 (0)