Skip to content

Commit

Permalink
[dependency] Add opentelemetry related third-party library. (apache#9990
Browse files Browse the repository at this point in the history
)
  • Loading branch information
luozenglin authored Jun 10, 2022
1 parent 47ca743 commit a34d4b5
Show file tree
Hide file tree
Showing 6 changed files with 442 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/LICENSE-dist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1525,12 +1525,15 @@ The Apache Software License, Version 2.0
* benchmark: 1.5.6
* simdjson: 1.0.2
* libhdfs3: commit 5fccd36
* opentelemetry-proto: 0.18.0
* opentelemetry-cpp: 1.4.0

The MIT License -- licenses/LICENSE-MIT.txt
* datatables: 1.10.25
* bootstrap: 1.17.1
* libxml2: 2.9.10
* krb5: 1.19
* nlohmann/json 3.10.1

LGPL -- licenes/LICENSE-LGPL.txt
* gsasl: 1.10.0/1.8.0
Expand Down
5 changes: 5 additions & 0 deletions thirdparty/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This file contains version of the third-party dependency libraries in the build-env image. The docker build-env image is apache/incubator-doris, and the tag is `build-env-${version}`

## v20220607
- Added: opentelemetry-cpp 1.4.0, it was introduced for tracing.
- Added: opentelemetry-proto 0.18.0, it is depended on by opentelemetry-cpp.
- Added: nlohmann/json 3.10.1, it is depended on by opentelemetry-cpp.

## v20220606
- Added: hyperscan 5.4.0, and a patch for compilation
- Added: ragel 6.1.0, it is used by hyperscan to generate files before compilation
Expand Down
23 changes: 23 additions & 0 deletions thirdparty/build-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,27 @@ build_simdjson() {
cp -r $TP_SOURCE_DIR/$SIMDJSON_SOURCE/include/* $TP_INCLUDE_DIR/
}

# nlohmann_json
build_nlohmann_json() {
check_if_source_exist $NLOHMANN_JSON_SOURCE
cd $TP_SOURCE_DIR/$NLOHMANN_JSON_SOURCE
mkdir -p $BUILD_DIR && cd $BUILD_DIR

$CMAKE_CMD -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX=$TP_INSTALL_DIR -DCMAKE_PREFIX_PATH=$TP_INSTALL_DIR -DJSON_BuildTests=OFF ..
${BUILD_SYSTEM} -j $PARALLEL && ${BUILD_SYSTEM} install
}

# opentelemetry
build_opentelemetry() {
check_if_source_exist $OPENTELEMETRY_SOURCE
cd $TP_SOURCE_DIR/$OPENTELEMETRY_SOURCE
mkdir -p $BUILD_DIR && cd $BUILD_DIR

$CMAKE_CMD -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX=$TP_INSTALL_DIR -DCMAKE_PREFIX_PATH=$TP_INSTALL_DIR -DBUILD_TESTING=OFF \
-DWITH_OTLP=ON -DWITH_OTLP_GRPC=OFF -DWITH_OTLP_HTTP=ON -DWITH_ZIPKIN=ON -DWITH_EXAMPLES=OFF ..
${BUILD_SYSTEM} -j $PARALLEL && ${BUILD_SYSTEM} install
}

build_libunixodbc
build_openssl
build_libevent
Expand Down Expand Up @@ -1065,6 +1086,8 @@ build_hdfs3
build_hdfs3_with_kerberos
build_benchmark
build_simdjson
build_nlohmann_json
build_opentelemetry
build_libbacktrace

echo "Finished to build all thirdparties"
Expand Down
16 changes: 16 additions & 0 deletions thirdparty/download-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,22 @@ if [ $ROCKSDB_SOURCE == "rocksdb-5.14.2" ]; then
fi
echo "Finished patching $ROCKSDB_SOURCE"

# opentelemetry patch is used to solve the problem that threadlocal depends on GLIBC_2.18
# see: https://github.com/apache/incubator-doris/pull/7911
if [ $OPENTELEMETRY_SOURCE == "opentelemetry-cpp-1.4.0" ]; then
rm -rf $TP_SOURCE_DIR/$OPENTELEMETRY_SOURCE/third_party/opentelemetry-proto/*
cp -r $TP_SOURCE_DIR/$OPENTELEMETRY_PROTO_SOURCE/* $TP_SOURCE_DIR/$OPENTELEMETRY_SOURCE/third_party/opentelemetry-proto
mkdir -p $TP_SOURCE_DIR/$OPENTELEMETRY_SOURCE/third_party/opentelemetry-proto/.git

cd $TP_SOURCE_DIR/$OPENTELEMETRY_SOURCE
if [ ! -f $PATCHED_MARK ]; then
patch -p1 < $TP_PATCH_DIR/opentelemetry-cpp-1.4.0.patch
touch $PATCHED_MARK
fi
cd -
fi
echo "Finished patching $OPENTELEMETRY_SOURCE"

# patch librdkafka to avoid crash
if [ $LIBRDKAFKA_SOURCE = "librdkafka-1.8.2" ]; then
cd $TP_SOURCE_DIR/$LIBRDKAFKA_SOURCE
Expand Down
Loading

0 comments on commit a34d4b5

Please sign in to comment.