Skip to content

Commit

Permalink
Add Jaeger exporter to CMake CI build (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored May 25, 2021
1 parent 2b080c1 commit 6ab0f78
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ jobs:
sudo ./ci/setup_cmake.sh
sudo ./ci/setup_ci_environment.sh
- name: run cmake tests (without otlp-exporter)
run: ./ci/do_ci.sh cmake.test
run: |
sudo ./ci/setup_thrift.sh
./ci/do_ci.sh cmake.test
cmake_gcc_48_test:
name: CMake gcc 4.8
Expand Down
1 change: 1 addition & 0 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if [[ "$1" == "cmake.test" ]]; then
cmake -DCMAKE_BUILD_TYPE=Debug \
-DWITH_PROMETHEUS=ON \
-DWITH_ZIPKIN=ON \
-DWITH_JAEGER=ON \
-DWITH_ELASTICSEARCH=ON \
-DWITH_METRICS_PREVIEW=ON \
-DCMAKE_CXX_FLAGS="-Werror" \
Expand Down
42 changes: 42 additions & 0 deletions ci/setup_thrift.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

set -e
export DEBIAN_FRONTEND=noninteractive
export THRIFT_VERSION=0.14.1

if ! type cmake > /dev/null; then
#cmake not installed, exiting
exit 1
fi
export BUILD_DIR=/tmp/
export INSTALL_DIR=/usr/local/

apt install -y --no-install-recommends \
libboost-all-dev \
libevent-dev \
libssl-dev \
ninja-build

pushd $BUILD_DIR
wget https://github.com/apache/thrift/archive/refs/tags/v${THRIFT_VERSION}.tar.gz
tar -zxvf v${THRIFT_VERSION}.tar.gz
cd thrift-${THRIFT_VERSION}
mkdir -p out
pushd out
cmake -G Ninja .. \
-DBUILD_COMPILER=OFF \
-DBUILD_CPP=ON \
-DBUILD_LIBRARIES=ON \
-DBUILD_NODEJS=OFF \
-DBUILD_PYTHON=OFF \
-DBUILD_JAVASCRIPT=OFF \
-DBUILD_C_GLIB=OFF \
-DBUILD_JAVA=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_TUTORIALS=OFF \
..

ninja -j $(nproc)
ninja install
popd
popd
2 changes: 1 addition & 1 deletion exporters/jaeger/src/thrift_sender.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include <agent.h>
#include <Agent.h>
#include <atomic>
#include <memory>
#include <mutex>
Expand Down
2 changes: 1 addition & 1 deletion exporters/jaeger/src/udp_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "TUDPTransport.h"
#include "transport.h"

#include <agent.h>
#include <Agent.h>
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/protocol/TCompactProtocol.h>
#include <thrift/protocol/TProtocol.h>
Expand Down

0 comments on commit 6ab0f78

Please sign in to comment.