Skip to content

Commit

Permalink
Adservice uses local trace batching processor
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Sep 11, 2023
1 parent 7be6f41 commit bee2d31
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
IMAGE_VERSION=1.4.0
IMAGE_NAME=ghcr.io/open-telemetry/demo

# New Relic
NEW_RELIC_OTLP_ENDPOINT=https://otlp.nr-data.net:4317
NEW_RELIC_API_KEY=${NEW_RELIC_API_KEY}

# Demo Platform
ENV_PLATFORM=local

Expand Down
13 changes: 12 additions & 1 deletion src/adservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

FROM eclipse-temurin:17-jdk AS builder

WORKDIR /usr/src/

RUN apt-get update && apt-get install unzip

RUN curl -L https://github.com/jack-berg/opentelemetry-java-contrib/archive/refs/heads/local-trace-batch-processor.zip --output contrib.zip \
&& unzip contrib.zip \
&& mv opentelemetry-java-contrib-local-trace-batch-processor ./contrib \
&& cd contrib \
&& ./gradlew :processors:assemble

WORKDIR /usr/src/app/

COPY ./src/adservice/gradlew* ./src/adservice/settings.gradle* ./src/adservice/build.gradle .
Expand All @@ -24,9 +34,10 @@ ARG version=1.28.0
WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/ ./
COPY --from=builder /usr/src/contrib/processors/build/libs/local-trace-batch-processor.jar ./local-trace-batch-processor.jar
ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /usr/src/app/opentelemetry-javaagent.jar
RUN chmod 644 /usr/src/app/opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS=-javaagent:/usr/src/app/opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS="-javaagent:/usr/src/app/opentelemetry-javaagent.jar -Dotel.javaagent.extensions=/usr/src/app/local-trace-batch-processor.jar"

EXPOSE ${AD_SERVICE_PORT}
ENTRYPOINT [ "./build/install/opentelemetry-demo-ad-service/bin/AdService" ]

0 comments on commit bee2d31

Please sign in to comment.