Skip to content

Commit 6d57918

Browse files
authored
Merge branch 'main' into dependabot/github_actions/gh-actions-packages-2a1d039189
2 parents cb826a7 + 967246f commit 6d57918

34 files changed

Lines changed: 1330 additions & 210 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# https://help.github.com/en/articles/about-code-owners
33

44
# Default owners, overridden by file/directory specific owners below
5-
* @DataDog/dd-trace-cpp
5+
* @DataDog/dd-trace-cpp @DataDog/cpp-reviewers

.github/workflows/dev.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
env:
6868
ASAN_OPTIONS: alloc_dealloc_mismatch=0
6969
- name: Upload test report to Datadog
70+
if: success() || failure()
7071
run: |
7172
curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-${{ matrix.arch }}" --output "/usr/local/bin/datadog-ci" && chmod +x /usr/local/bin/datadog-ci
7273
datadog-ci junit upload --service dd-trace-cpp --tags test.source.file:test/*.cpp .build/report.xml
@@ -156,9 +157,10 @@ jobs:
156157
& 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\Launch-VsDevShell.ps1' -arch ${{ matrix.arch }}
157158
.\build\test\tests.exe -r junit -o report.xml
158159
- name: Upload test report to Datadog
160+
if: success() || failure()
159161
run: |
160162
Invoke-WebRequest -Uri "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_win-x64" -OutFile "datadog-ci.exe"
161-
./datadog-ci.exe junit upload --service dd-trace-cpp --tags test.source.file:test/*.cpp report.xml
163+
./datadog-ci.exe junit upload --service dd-trace-cpp --tags test.source.file:test/*.cpp report.xml
162164
163165
coverage:
164166
needs: build-linux-cmake
@@ -181,13 +183,6 @@ jobs:
181183
cd .coverage
182184
cp filtered.info lcov.info
183185
datadog-ci coverage upload lcov.info
184-
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
185-
with:
186-
fail_ci_if_error: true
187-
files: .coverage/filtered.info
188-
disable_search: true
189-
token: ${{ secrets.CODECOV_TOKEN }}
190-
verbose: true
191186
192187
build-system-tests-artifact:
193188
runs-on: ubuntu-22.04

.gitignore

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
/bazel-*
2-
/.build/
3-
/build/
4-
/build-*/
5-
/.coverage/
6-
build/
7-
8-
dist/
9-
out/
10-
MODULE.bazel.lock
11-
.vscode
1+
.build/
122
.cache/
3+
.coverage/
134
.cursor/
145
.DS_Store
6+
.install/
7+
.vscode
8+
bazel-*
9+
build-*/
10+
build/
11+
dist/
12+
MODULE.bazel.lock
13+
out/

.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ include:
1414
# Config Registry CI Jobs
1515
validate_supported_configurations_v2_local_file:
1616
stage: config-validation
17-
image: registry.ddbuild.io/ci/libdatadog-build/packaging:82290795
17+
image: registry.ddbuild.io/ci/libdatadog-build/packaging:100425777
1818
tags: ["runner:apm-k8s-tweaked-metal"]
1919
rules:
2020
- when: on_success
2121
extends: .validate_supported_configurations_v2_local_file
2222
variables:
2323
LOCAL_JSON_PATH: "supported-configurations.json"
24-
BACKFILLED: false
24+
BACKFILLED: true
2525

2626
update_central_configurations_version_range_v2:
2727
stage: config-validation
28-
image: registry.ddbuild.io/ci/libdatadog-build/packaging:82290795
28+
image: registry.ddbuild.io/ci/libdatadog-build/packaging:100425777
2929
tags: ["runner:apm-k8s-tweaked-metal"]
3030
extends: .update_central_configurations_version_range_v2
3131
variables:

.gitlab/config-registry.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ variables:
1919
- when: on_success
2020
variables:
2121
LOCAL_JSON_PATH: ""
22-
BACKFILLED: ""
22+
BACKFILLED: "true"
2323
before_script:
2424
- *download-scripts-from-template
2525
script:

CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ project(
1818

1919
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
2020
option(BUILD_STATIC_LIBS "Build static libraries" ON)
21+
option(DD_TRACE_BUILD_C_BINDING "Build C binding" OFF)
2122

2223
if (WIN32)
2324
option(DD_TRACE_STATIC_CRT "Build dd-trace-cpp with static CRT with MSVC" OFF)
@@ -104,6 +105,10 @@ if (DD_TRACE_BUILD_TOOLS)
104105
add_subdirectory(tools/config-inversion)
105106
endif ()
106107

108+
if (DD_TRACE_BUILD_C_BINDING)
109+
add_subdirectory(binding/c)
110+
endif ()
111+
107112
add_library(dd-trace-cpp-objects OBJECT)
108113
add_library(dd-trace-cpp::obj ALIAS dd-trace-cpp-objects)
109114

@@ -294,11 +299,11 @@ if (BUILD_SHARED_LIBS)
294299
)
295300

296301
install(
297-
TARGETS dd-trace-cpp-shared
302+
TARGETS dd-trace-cpp-shared
298303
EXPORT dd-trace-cpp-targets
299304
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
300305
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
301-
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
306+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
302307
)
303308
endif ()
304309

@@ -350,7 +355,7 @@ if (BUILD_STATIC_LIBS)
350355
EXPORT dd-trace-cpp-targets
351356
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
352357
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
353-
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
358+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
354359
)
355360
endif ()
356361

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# This is the image used to build and test the library in CircleCI.
2-
# See .circleci/ for more information.
1+
# This is the image used to build and test the library in CI.
32

43
from ubuntu:22.04
54

@@ -37,4 +36,3 @@ copy bin/install-lcov /tmp/install-lcov
3736
run chmod +x /tmp/install-lcov && /tmp/install-lcov && rm /tmp/install-lcov
3837

3938
run curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | bash
40-

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module(
33
version = "2.0.1",
44
)
55

6-
bazel_dep(name = "abseil-cpp", version = "20250814.1", repo_name = "com_google_absl")
6+
bazel_dep(name = "abseil-cpp", version = "20260107.1", repo_name = "com_google_absl")
77
bazel_dep(name = "bazel_skylib", version = "1.9.0")
88
bazel_dep(name = "platforms", version = "1.0.0")
9-
bazel_dep(name = "rules_cc", version = "0.2.16")
9+
bazel_dep(name = "rules_cc", version = "0.2.17")

README.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Datadog C++ Tracing Library
22
===========================
3-
[![codecov](https://codecov.io/gh/DataDog/dd-trace-cpp/graph/badge.svg?token=78VYILWPMC)](https://codecov.io/gh/DataDog/dd-trace-cpp)
43

54
```c++
65
#include <datadog/span_config.h>
@@ -53,12 +52,12 @@ The library has been tested and is compatible on the following CPU architecture,
5352
### Requirements
5453
`dd-trace-cpp` requires a [supported](#platform-support) C++17 compiler.
5554

56-
A recent version of CMake is required (`3.24`), which might not be in your
55+
A recent version of CMake is required (`3.28`), which might not be in your
5756
system's package manager. [bin/install-cmake](bin/install-cmake) is an installer
58-
for a recent CMake.
57+
for a recent CMake, on Linux.
5958

6059
### Building
61-
Build this library from source using [CMake][1].
60+
Build this library from source using [CMake](https://cmake.org).
6261

6362
```shell
6463
git clone 'https://github.com/datadog/dd-trace-cpp'
@@ -67,7 +66,7 @@ cmake -B build .
6766
cmake --build build -j
6867
```
6968

70-
By default CMake will generate both static and shared libraries. To build either on of them use
69+
By default CMake will generate both static and shared libraries. To build only one of them use
7170
either `BUILD_SHARED_LIBS` or `BUILD_STATIC_LIBS`. Example:
7271

7372
```shell
@@ -76,14 +75,11 @@ cmake -B build -DBUILD_SHARED_LIBS=1 .
7675

7776
### Installation
7877
Installation places a shared library and public headers into the appropriate system directories
79-
(`/usr/local/[...]`), or to a specified installation prefix.
78+
(`/usr/local/[]`), or to a specified installation prefix. Example:
8079

8180
```shell
82-
cmake --install
83-
84-
# Here is how to install dd-trace-cpp into `.install/` within the source
85-
# repository.
86-
# cmake --install build --prefix=.install
81+
# Install dd-trace-cpp into `.install/` within the source repository.
82+
cmake --install build --prefix=.install
8783
```
8884

8985
### Optional: Linking to the shared library
@@ -111,18 +107,14 @@ Pass `-DDD_TRACE_BUILD_TESTING=1` to `cmake` to include the unit tests in the bu
111107

112108
The resulting unit test executable is `test/tests` within the build directory.
113109
```shell
114-
cmake -Bbuild -DDD_TRACE_BUILD_TESTING=1 ..
110+
cmake -B build -DDD_TRACE_BUILD_TESTING=1 .
115111
cmake --build build -j
116112
./build/test/tests
117113
```
118114

119115
Alternatively, [bin/test](bin/test) is provided for convenience.
120116

121-
Code coverage reports are available [here][2].
122-
123117
Contributing
124118
------------
125-
See the [contributing guidelines](CONTRIBUTING.md) and the [maintainer docs](doc/maintainers.md) for information on the overall structure of the repository.
126-
127-
[1]: https://cmake.org/
128-
[2]: https://datadog.github.io/dd-trace-cpp-coverage
119+
See the [contributing guidelines](CONTRIBUTING.md) and the [maintainer docs](doc/maintainers.md)
120+
for information on the overall structure of the repository.

0 commit comments

Comments
 (0)