Skip to content

Commit

Permalink
chore: use latest Otel Java Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll committed Aug 27, 2024
1 parent 6ecbb3c commit 0500da5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/adservice/Dockerfile.elastic
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ RUN ./gradlew installDist -PprotoSourceDir=./proto

FROM eclipse-temurin:21-jre

ARG version=0.4.0
# ARG version=0.4.0
WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/ ./
ADD --chmod=644 https://repo1.maven.org/maven2/co/elastic/otel/elastic-otel-javaagent/$version/elastic-otel-javaagent-$version.jar /usr/src/app/opentelemetry-javaagent.jar
ADD --chmod=644 https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=co.elastic.otel&a=elastic-otel-javaagent&v=LATEST /usr/src/app/opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS=-javaagent:/usr/src/app/opentelemetry-javaagent.jar
ENV ELASTIC_OTEL_INFERRED_SPANS_ENABLED=true
ENV OTEL_INFERRED_SPANS_ENABLED=true
ENV ELASTIC_OTEL_SPAN_STACK_TRACE_MIN_DURATION=2

EXPOSE ${AD_SERVICE_PORT}
Expand Down
4 changes: 2 additions & 2 deletions src/frauddetectionservice/Dockerfile.elastic
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ RUN gradle shadowJar

FROM gcr.io/distroless/java17-debian11

ARG version=0.4.0
# ARG version=0.4.0
WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/build/libs/frauddetectionservice-1.0-all.jar ./
ADD --chmod=644 https://repo1.maven.org/maven2/co/elastic/otel/elastic-otel-javaagent/$version/elastic-otel-javaagent-$version.jar /app/opentelemetry-javaagent.jar
ADD --chmod=644 https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=co.elastic.otel&a=elastic-otel-javaagent&v=LATEST /app/opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS=-javaagent:/app/opentelemetry-javaagent.jar
ENV ELASTIC_OTEL_INFERRED_SPANS_ENABLED=true
ENV ELASTIC_OTEL_SPAN_STACK_TRACE_MIN_DURATION=2
Expand Down
6 changes: 3 additions & 3 deletions src/kafka/Dockerfile.elastic
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
FROM apache/kafka:3.7.0

USER root
ARG version=0.4.0
# ARG version=0.4.0

USER appuser

ADD --chown=appuser:appuser https://repo1.maven.org/maven2/co/elastic/otel/elastic-otel-javaagent/$version/elastic-otel-javaagent-$version.jar /tmp/opentelemetry-javaagent.jar
ADD --chown=appuser:appuser https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=co.elastic.otel&a=elastic-otel-javaagent&v=LATEST /tmp/opentelemetry-javaagent.jar

ENV ELASTIC_OTEL_INFERRED_SPANS_ENABLED=true
ENV OTEL_INFERRED_SPANS_ENABLED=true
ENV ELASTIC_OTEL_SPAN_STACK_TRACE_MIN_DURATION=2
ENV KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093
ENV KAFKA_CONTROLLER_QUORUM_VOTERS='[email protected]:9093'
Expand Down

0 comments on commit 0500da5

Please sign in to comment.