Skip to content

Commit

Permalink
Update to OpenTracing-1.5 (#63)
Browse files Browse the repository at this point in the history
* Update dependencies

(cherry picked from commit 8e3e8e2)

* Update Datadog version to reference OpenTracing 1.5.0 compatible release. Updates readme to reflect all tracers latest version numbers. Fix extremely foolish error of mine in an example.

* Change Lightstep to 0.8.1

* Change Lightstep to 0.8.1, not forgetting OpenResty image

* Also update GRPC version to match that used by lightstep

* Add instructions for installing protobuf.
  • Loading branch information
rnburn authored Sep 27, 2018
1 parent 0061a4a commit 5ab766b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ ARG NGINX_LABEL=latest

FROM nginx:${NGINX_LABEL}

ARG OPENTRACING_CPP_VERSION=v1.4.0
ARG ZIPKIN_CPP_VERSION=v0.4.0
ARG LIGHTSTEP_VERSION=v0.7.1
ARG JAEGER_CPP_VERSION=v0.4.1
ARG GRPC_VERSION=v1.4.x
ARG DATADOG_VERSION=v0.2.4
ARG OPENTRACING_CPP_VERSION=v1.5.0
ARG ZIPKIN_CPP_VERSION=v0.5.2
ARG LIGHTSTEP_VERSION=v0.8.1
ARG JAEGER_CPP_VERSION=v0.4.2
ARG GRPC_VERSION=v1.10.x
ARG DATADOG_VERSION=v0.3.0

COPY . /src

Expand Down Expand Up @@ -76,7 +76,7 @@ RUN set -x \
### Build dd-opentracing-cpp
&& git clone -b $DATADOG_VERSION https://github.com/DataDog/dd-opentracing-cpp.git \
&& cd dd-opentracing-cpp \
&& scripts/install_dependencies.sh not-opentracing not-curl \
&& scripts/install_dependencies.sh not-opentracing not-curl not-zlib \
&& mkdir .build && cd .build \
&& cmake -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF .. \
&& make && make install \
Expand All @@ -88,6 +88,8 @@ RUN set -x \
&& git submodule update --init \
&& make HAS_SYSTEM_PROTOBUF=false && make install \
&& make && make install \
&& cd third_party/protobuf \
&& make install \
&& cd "$tempDir" \
### Build lightstep-tracer-cpp
&& git clone -b $LIGHTSTEP_VERSION https://github.com/lightstep/lightstep-tracer-cpp.git \
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile-openresty
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ ARG RESTY_CONFIG_OPTIONS="\
--add-dynamic-module=/src/opentracing \
"
ARG RESTY_CONFIG_OPTIONS_MORE=""
ARG OPENTRACING_CPP_VERSION="v1.4.0"
ARG OPENTRACING_CPP_VERSION="v1.5.0"
ARG LUA_BRIDGE_TRACER_VERSION="9213e1b0c23a0d028093895d290c705680fbf4c5"
ARG JAEGER_VERSION="v0.4.1"
ARG LIGHTSTEP_VERSION="v0.7.1"
ARG ZIPKIN_VERSION="v0.4.0"
ARG JAEGER_VERSION="v0.4.2"
ARG LIGHTSTEP_VERSION="v0.8.1"
ARG ZIPKIN_VERSION="v0.5.2"

LABEL resty_version="${RESTY_VERSION}"
LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:18.04

ARG OPENTRACING_CPP_VERSION=v1.4.0
ARG OPENTRACING_CPP_VERSION=v1.5.0
ARG NGINX_VERSION=1.13.12

COPY . /src
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,19 @@ $ make && sudo make install
```

You will also need to install a C++ tracer for either [Jaeger](https://github.com/jaegertracing/jaeger-client-cpp), [LightStep](
https://github.com/lightstep/lightstep-tracer-cpp), or [Zipkin](https://github.com/rnburn/zipkin-cpp-opentracing). For linux x86-64, portable binary plugins are available:
https://github.com/lightstep/lightstep-tracer-cpp), [Datadog](https://github.com/DataDog/dd-opentracing-cpp), or [Zipkin](https://github.com/rnburn/zipkin-cpp-opentracing). For linux x86-64, portable binary plugins are available:
```
# Jaeger
wget https://github.com/jaegertracing/jaeger-client-cpp/releases/download/v0.4.1/libjaegertracing_plugin.linux_amd64.so -O /usr/local/lib/libjaegertracing_plugin.so
wget https://github.com/jaegertracing/jaeger-client-cpp/releases/download/v0.4.2/libjaegertracing_plugin.linux_amd64.so -O /usr/local/lib/libjaegertracing_plugin.so
# LightStep
wget -O - https://github.com/lightstep/lightstep-tracer-cpp/releases/download/v0.7.1/linux-amd64-liblightstep_tracer_plugin.so.gz | gunzip -c > /usr/local/lib/liblightstep_tracer_plugin.so
wget -O - https://github.com/lightstep/lightstep-tracer-cpp/releases/download/v0.8.1/linux-amd64-liblightstep_tracer_plugin.so.gz | gunzip -c > /usr/local/lib/liblightstep_tracer_plugin.so
# Zipkin
wget -O - https://github.com/rnburn/zipkin-cpp-opentracing/releases/download/v0.4.0/linux-amd64-libzipkin_opentracing_plugin.so.gz | gunzip -c > /usr/local/lib/libzipkin_opentracing_plugin.so
wget -O - https://github.com/rnburn/zipkin-cpp-opentracing/releases/download/v0.5.2/linux-amd64-libzipkin_opentracing_plugin.so.gz | gunzip -c > /usr/local/lib/libzipkin_opentracing_plugin.so
# Datadog
wget -O - https://github.com/DataDog/dd-opentracing-cpp/releases/download/v0.2.4/linux-amd64-libdd_opentracing_plugin.so.gz | gunzip -c > /usr/local/lib/libdd_opentracing_plugin.so
wget -O - https://github.com/DataDog/dd-opentracing-cpp/releases/download/v0.3.0/linux-amd64-libdd_opentracing_plugin.so.gz | gunzip -c > /usr/local/lib/libdd_opentracing_plugin.so
```

2 changes: 1 addition & 1 deletion ci/build_module_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

export OPENTRACING_VERSION=1.4.0
export OPENTRACING_VERSION=1.5.0
NGINX_VERSIONS=(1.15.0 1.14.0 1.13.12 1.12.2)

# Compile for a portable cpu architecture
Expand Down
2 changes: 1 addition & 1 deletion example/trivial/datadog/go/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var collectorHost = flag.String("collector_host", "dd-agent", "Host for Datadog
var collectorPort = flag.String("collector_port", "8126", "Port for Datadog agent")

func handler(w http.ResponseWriter, r *http.Request) {
wireContext, err := opentracing.GlobalTracer().Extract(
wireContext, _ := opentracing.GlobalTracer().Extract(
opentracing.HTTPHeaders,
opentracing.HTTPHeadersCarrier(r.Header))
span := opentracing.StartSpan("GET /", opentracing.ChildOf(wireContext))
Expand Down

0 comments on commit 5ab766b

Please sign in to comment.