Skip to content

Latest commit

 

History

History
73 lines (47 loc) · 1.82 KB

File metadata and controls

73 lines (47 loc) · 1.82 KB

Contributing

Fork, Clone, Branch and Create your PR

When cloning the repo, initialize the submodules you need. For a standard build:

git submodule update --init deps/dd-trace-cpp deps/nginx-datadog

The deps/inject-browser-sdk submodule is a private repo and is only required when building with -DHTTPD_DATADOG_ENABLE_RUM=ON. If you have access, use --recursive instead to pull it as well.

Rules

  • Follow the pattern of what you already see in the code.
  • Follow the coding style.

Development

Prerequisites

Tool Version Notes
clang or gcc 14+ or 11.4+
python 3.0+
cmake 3.12+

Once you got a valid Python installation, install all the dependencies with:

pip install -r requirements.txt

Compiling

Setup httpd

In order to build the module you have to configure httpd with the scripts/setup-httpd.py script. Check what is the latest available version on Apache website, then:

export HTTPD_VERSION=2.4.66
python scripts/setup-httpd.py $HTTPD_VERSION
cd httpd
./configure --with-included-apr --prefix=$(pwd)/httpd-build --enable-mpms-shared="all"

Install Rust

The RUM variant requires Rust to build:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Relaunch your terminal (or do source ~/.cargo/env).

Build the Module

CMake is our build system. If you are not familiar with CMake, read the tutorial.

Configure and compile all targets in release:

cmake -B build -DCMAKE_BUILD_TYPE=Release -DHTTPD_SRC_DIR=httpd .
cmake --build build -j

Testing

For now there are only integration tests.

How to Debug

Run with -X.