Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Oct 31, 2025

Note

Adds a new OpenTelemetry integration for the server SDK (tracing hook) with example and tests, enables hooks in contract tests, and updates build/CI/release to support it.

  • OpenTelemetry Integration (new package):
    • Adds libs/server-sdk-otel providing TracingHook (include/launchdarkly/server_side/integrations/otel/tracing_hook.hpp, src/tracing_hook.cpp) with options builder and unit tests.
    • CMake support with LD_BUILD_OTEL_SUPPORT, LD_BUILD_OTEL_FETCH_DEPS, LD_OTEL_CPP_VERSION; links against opentelemetry-cpp::api.
    • New example examples/hello-cpp-server-otel demonstrating tracing hook and OTLP exporter.
  • Contract Tests (hooks):
    • Extends data model with hooks configuration and related types.
    • Implements ContractTestHook used by server test harness; registers via config and advertises evaluation-hooks and track-hooks capabilities.
  • Build/CI/Release:
    • Updates scripts/build.sh to build OTel targets and fetch deps when needed.
    • Adds install_curl input to shared CI and uses it for OTel builds; sets CMAKE_PREFIX_PATH for CURL.
    • New workflow server-otel.yml to build/test OTel on Linux/macOS/Windows.
    • release-please config/manifests updated to include libs/server-sdk-otel (v0.1.0) and outputs; docs workflow supports libs/server-sdk-otel.
  • CMake/Infra:
    • Root CMakeLists.txt adds LD_BUILD_OTEL_SUPPORT option and add_subdirectory(libs/server-sdk-otel); examples gated on it.
    • cmake/json.cmake switches FetchContent name to nlohmann_json to avoid target duplication.
    • README documents new OTel options.

Written by Cursor Bugbot for commit e62e575. This will update automatically on new commits. Configure here.

@kinyoklion kinyoklion marked this pull request as ready for review October 31, 2025 21:37
@kinyoklion kinyoklion requested a review from a team as a code owner October 31, 2025 21:37
cursor[bot]

This comment was marked as outdated.

@kinyoklion kinyoklion force-pushed the rlamb/hooks-contract-tests branch from 8b1117d to e62e575 Compare October 31, 2025 21:50
@semgrep-code-launchdarkly
Copy link

Semgrep found 1 third-party-action-not-pinned-to-commit-sha finding:

  • .github/workflows/server-otel.yml

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Broken Windows CMake runtime path separators

The CMake path construction for CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG and CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE within the WIN32 block is missing a path separator. This results in malformed directory paths.

libs/server-sdk-otel/tests/CMakeLists.txt#L9-L11

if (WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}../")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}../")

Fix in Cursor Fix in Web


Base automatically changed from rlamb/sdk-1502/handle-null-payload to main November 3, 2025 16:55
@kinyoklion kinyoklion merged commit cf8e429 into main Nov 3, 2025
6 checks passed
@kinyoklion kinyoklion deleted the rlamb/hooks-contract-tests branch November 3, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants