Commit cf8e429
authored
chore: Add support for server-side hooks tests. (#498)
<!-- CURSOR_SUMMARY -->
> [!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.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e62e575. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent d12b7a0 commit cf8e429
6 files changed
Lines changed: 388 additions & 1 deletion
File tree
- contract-tests
- data-model/include/data_model
- server-contract-tests
- include
- src
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
116 | 146 | | |
117 | 147 | | |
118 | 148 | | |
| |||
125 | 155 | | |
126 | 156 | | |
127 | 157 | | |
| 158 | + | |
128 | 159 | | |
129 | 160 | | |
130 | 161 | | |
| |||
138 | 169 | | |
139 | 170 | | |
140 | 171 | | |
141 | | - | |
| 172 | + | |
| 173 | + | |
142 | 174 | | |
143 | 175 | | |
144 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
Lines changed: 72 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
0 commit comments