Skip to content

Commit e001278

Browse files
Little fixes and improvements in documentation (#279)
1 parent b93bdde commit e001278

File tree

9 files changed

+38
-65
lines changed

9 files changed

+38
-65
lines changed

.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

.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/

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-

README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ The library has been tested and is compatible on the following CPU architecture,
5252
### Requirements
5353
`dd-trace-cpp` requires a [supported](#platform-support) C++17 compiler.
5454

55-
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
5656
system's package manager. [bin/install-cmake](bin/install-cmake) is an installer
57-
for a recent CMake.
57+
for a recent CMake, on Linux.
5858

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

6262
```shell
6363
git clone 'https://github.com/datadog/dd-trace-cpp'
@@ -66,7 +66,7 @@ cmake -B build .
6666
cmake --build build -j
6767
```
6868

69-
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
7070
either `BUILD_SHARED_LIBS` or `BUILD_STATIC_LIBS`. Example:
7171

7272
```shell
@@ -75,14 +75,11 @@ cmake -B build -DBUILD_SHARED_LIBS=1 .
7575

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

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

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

111108
The resulting unit test executable is `test/tests` within the build directory.
112109
```shell
113-
cmake -Bbuild -DDD_TRACE_BUILD_TESTING=1 ..
110+
cmake -B build -DDD_TRACE_BUILD_TESTING=1 .
114111
cmake --build build -j
115112
./build/test/tests
116113
```
117114

118115
Alternatively, [bin/test](bin/test) is provided for convenience.
119116

120-
Code coverage reports are available [here][2].
121-
122117
Contributing
123118
------------
124-
See the [contributing guidelines](CONTRIBUTING.md) and the [maintainer docs](doc/maintainers.md) for information on the overall structure of the repository.
125-
126-
[1]: https://cmake.org/
127-
[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.

bin/README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@ Scripts
22
=======
33
This directory contains scripts that are useful during development.
44

5-
- [bazel-build](bazel-build) builds the library using [Bazel][1] via [bazelisk][2].
5+
- [bazel-build](bazel-build) builds the library using
6+
[Bazel](https://bazel.build) via [bazelisk](https://github.com/bazelbuild/bazelisk).
67
- [benchmark](benchmark) builds the library and its [benchmark](../benchmark),
78
and runs the benchmark.
89
- [check](check) performs some of the checks that [continuous
9-
integration](../.circleci) performs. It's convenient to run this script before
10-
pushing changes.
10+
integration](../github/workflows) performs. It's convenient to run this script
11+
before pushing changes.
1112
- [check-format](check-format) verifies that the source code is formatted as
1213
[format](format) prefers.
1314
- [check-version](check-version) accepts a version string as a command line
1415
argument (e.g. "v1.2.3") and checks whether the version within the source code
1516
matches. This is a good check to perform before publishing a source release.
16-
- [cmake-build](cmake-build) builds the library using [CMake][3].
17+
- [cmake-build](cmake-build) builds the library using [CMake](https://cmake.org).
1718
- [format](format) formats all of the C++ source code using
18-
[clang-format-14][4].
19+
[clang-format-14]( https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormat.html).
1920
- [hasher-example](hasher-example) builds the library, including the [command
2021
line example](../examples/hasher) program, and then runs the example.
2122
- [http-server-example](http-server-example) runs the docker compose based [HTTP
@@ -33,8 +34,3 @@ This directory contains scripts that are useful during development.
3334
`CXX` environment variables based on its first argument, which is either "gnu"
3435
(to use the gcc/g++ toolchain) or "llvm" (to use the clang/clang++ toolchain).
3536
For example: `with-toolchain llvm cmake -DDD_TRACE_BUILD_TESTING=1 ..`.
36-
37-
[1]: https://bazel.build/
38-
[2]: https://github.com/bazelbuild/bazelisk
39-
[3]: https://cmake.org/
40-
[4]: https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormat.html

bin/check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# Run some of the checks that are performed by CircleCI.
3+
# Run some of the checks that are performed by the CI.
44
# This is convenient to run before committing.
55

66
set -e

bin/format

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ if ! >/dev/null command -v docker; then
3333
exit 1
3434
fi
3535

36+
if ! docker info >/dev/null 2>&1; then
37+
>&2 echo "Docker is not running. Please start Docker."
38+
exit 1
39+
fi
40+
3641
# If they haven't downloaded the clang docker image before, then prompt the
3742
# user before telling docker to download it (it's large).
3843
image=silkeh/clang:$version
@@ -62,8 +67,10 @@ docker_clang_format() {
6267
# shellcheck disable=SC2086
6368
find_sources | while IFS= read -r arg; do
6469
process_arg "$arg"
70+
# The --platform option forces linux/amd64 because silkeh/clang:14 is only available on this platform.
6571
done | xargs -0 \
6672
docker run \
73+
--platform linux/amd64 \
6774
--interactive \
6875
--rm \
6976
--volume /etc/passwd:/etc/passwd:ro \

doc/maintainers.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -630,28 +630,6 @@ approaches:
630630
- Add a `Logger::log_debug` function that optionally prints fine-grained tracing
631631
information to the log, in violation of constraint (1).
632632

633-
Operations
634-
----------
635-
TODO
636-
637-
### Testing
638-
TODO
639-
640-
### Code Coverage
641-
TODO
642-
643-
### Benchmarks
644-
TODO
645-
646-
### Continuous Integration
647-
TODO
648-
649-
### Releases
650-
TODO
651-
652-
### Support
653-
TODO
654-
655633
[1]: https://github.com/DataDog/dd-opentracing-cpp
656634
[2]: https://github.com/open-telemetry/opentelemetry-cpp
657635
[3]: ../include/datadog/span.h

examples/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Example Usage
33
This directory contains two example projects that illustrate how dd-trace-cpp
44
can be used to add Datadog tracing to a C++ application.
55

6+
- [baggage](baggage) demonstrates how to parse and validate baggage header
7+
strings.
68
- [hasher](hasher) is a command-line tool that creates a complete trace
79
involving only one service.
810
- [http-server](http-server) is an ensemble of services, including two C++

0 commit comments

Comments
 (0)