Skip to content

Commit 6ab0f78

Browse files
authored
Add Jaeger exporter to CMake CI build (#786)
1 parent 2b080c1 commit 6ab0f78

File tree

5 files changed

+48
-3
lines changed

5 files changed

+48
-3
lines changed

.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ jobs:
1919
sudo ./ci/setup_cmake.sh
2020
sudo ./ci/setup_ci_environment.sh
2121
- name: run cmake tests (without otlp-exporter)
22-
run: ./ci/do_ci.sh cmake.test
22+
run: |
23+
sudo ./ci/setup_thrift.sh
24+
./ci/do_ci.sh cmake.test
2325
2426
cmake_gcc_48_test:
2527
name: CMake gcc 4.8

ci/do_ci.sh

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ if [[ "$1" == "cmake.test" ]]; then
3434
cmake -DCMAKE_BUILD_TYPE=Debug \
3535
-DWITH_PROMETHEUS=ON \
3636
-DWITH_ZIPKIN=ON \
37+
-DWITH_JAEGER=ON \
3738
-DWITH_ELASTICSEARCH=ON \
3839
-DWITH_METRICS_PREVIEW=ON \
3940
-DCMAKE_CXX_FLAGS="-Werror" \

ci/setup_thrift.sh

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
set -e
4+
export DEBIAN_FRONTEND=noninteractive
5+
export THRIFT_VERSION=0.14.1
6+
7+
if ! type cmake > /dev/null; then
8+
#cmake not installed, exiting
9+
exit 1
10+
fi
11+
export BUILD_DIR=/tmp/
12+
export INSTALL_DIR=/usr/local/
13+
14+
apt install -y --no-install-recommends \
15+
libboost-all-dev \
16+
libevent-dev \
17+
libssl-dev \
18+
ninja-build
19+
20+
pushd $BUILD_DIR
21+
wget https://github.com/apache/thrift/archive/refs/tags/v${THRIFT_VERSION}.tar.gz
22+
tar -zxvf v${THRIFT_VERSION}.tar.gz
23+
cd thrift-${THRIFT_VERSION}
24+
mkdir -p out
25+
pushd out
26+
cmake -G Ninja .. \
27+
-DBUILD_COMPILER=OFF \
28+
-DBUILD_CPP=ON \
29+
-DBUILD_LIBRARIES=ON \
30+
-DBUILD_NODEJS=OFF \
31+
-DBUILD_PYTHON=OFF \
32+
-DBUILD_JAVASCRIPT=OFF \
33+
-DBUILD_C_GLIB=OFF \
34+
-DBUILD_JAVA=OFF \
35+
-DBUILD_TESTING=OFF \
36+
-DBUILD_TUTORIALS=OFF \
37+
..
38+
39+
ninja -j $(nproc)
40+
ninja install
41+
popd
42+
popd

exporters/jaeger/src/thrift_sender.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#pragma once
55

6-
#include <agent.h>
6+
#include <Agent.h>
77
#include <atomic>
88
#include <memory>
99
#include <mutex>

exporters/jaeger/src/udp_transport.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "TUDPTransport.h"
77
#include "transport.h"
88

9-
#include <agent.h>
9+
#include <Agent.h>
1010
#include <thrift/protocol/TBinaryProtocol.h>
1111
#include <thrift/protocol/TCompactProtocol.h>
1212
#include <thrift/protocol/TProtocol.h>

0 commit comments

Comments
 (0)