Skip to content

Commit

Permalink
Major version update (version 2.0.0) for OTel Java instrumentation (o…
Browse files Browse the repository at this point in the history
…pen-telemetry#1352)

* Major version update (version 2.0.0) for OTel Java instrumentation for
adservice, frauddetectionservice, kafka

The new Java instrumentation uses HTTP as the default export protocol. This PR changes the Java services to export HTTP instead of gRPC.

The new Java instrumentation introduces a lot of new kafka.consumer.* metrics from frauddetectionservice.

* Add CHANGELOG

* Fix CHANGELOG. Update docker-compose.minimal.yml

---------

Co-authored-by: Juliano Costa <[email protected]>
  • Loading branch information
mviitane and julianocosta89 authored Feb 1, 2024
1 parent 46912ce commit 22dc002
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 15 deletions.
19 changes: 14 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Changelog

Please update changelog as part of any significant pull request. Place short
description of your change into "Unreleased" section. As part of release process
content of "Unreleased" section content will generate release notes for the
release.
description of your change into "Unreleased" section. As part of release
process content of "Unreleased" section content will generate release notes for
the release.

## Unreleased

Expand All @@ -25,10 +25,19 @@ release.
([#1346](https://github.com/open-telemetry/opentelemetry-demo/pull/1346))
* [productcatalogservice] update wiki link
([#1346](https://github.com/open-telemetry/opentelemetry-demo/pull/1346))
* [adservice] added group and anonymous read permission to opentelemetry-javaagent.jar
* [adservice] added group and anonymous read permission to
opentelemetry-javaagent.jar
([#1348](https://github.com/open-telemetry/opentelemetry-demo/pull/1348))
* [frauddetectionservice] added group and anonymous read permission to opentelemetry-javaagent.jar
* [frauddetectionservice] added group and anonymous read permission to
opentelemetry-javaagent.jar
([#1348](https://github.com/open-telemetry/opentelemetry-demo/pull/1348))
* [adservice] Major version update for Java instrumentation, version 2.0.0
([#1352](https://github.com/open-telemetry/opentelemetry-demo/pull/1352))
* [frauddetectionservice] Major version update for Java instrumentation,
version 2.0.0
([#1352](https://github.com/open-telemetry/opentelemetry-demo/pull/1352))
* [kafka] Major version update for Java instrumentation, version 2.0.0
([#1352](https://github.com/open-telemetry/opentelemetry-demo/pull/1352))

## 1.7.2

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
- "${AD_SERVICE_PORT}"
environment:
- AD_SERVICE_PORT
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_LOGS_EXPORTER=otlp
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ services:
environment:
- AD_SERVICE_PORT
- FEATURE_FLAG_GRPC_SERVICE_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_LOGS_EXPORTER=otlp
Expand Down Expand Up @@ -252,7 +252,7 @@ services:
restart: unless-stopped
environment:
- KAFKA_SERVICE_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=frauddetectionservice
Expand Down Expand Up @@ -584,7 +584,7 @@ services:
restart: unless-stopped
environment:
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=kafka
Expand Down
2 changes: 1 addition & 1 deletion src/adservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN ./gradlew installDist -PprotoSourceDir=./proto

FROM eclipse-temurin:21-jre

ARG version=1.31.0
ARG version=2.0.0
WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/ ./
Expand Down
4 changes: 2 additions & 2 deletions src/adservice/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ description = 'Ad Service'
group = "adservice"
version = "0.1.0-SNAPSHOT"

def opentelemetryVersion = "1.31.0"
def opentelemetryInstrumentationAlphaVersion = "1.31.0-alpha"
def opentelemetryVersion = "1.34.1"
def opentelemetryInstrumentationAlphaVersion = "2.0.0-alpha"
def grpcVersion = "1.59.0"
def jacksonVersion = "2.15.3"
def protocVersion = "3.25.0"
Expand Down
2 changes: 1 addition & 1 deletion src/adservice/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion src/frauddetectionservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN gradle shadowJar

FROM gcr.io/distroless/java17-debian11

ARG version=1.31.0
ARG version=2.0.0
WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/build/libs/frauddetectionservice-1.0-all.jar ./
Expand Down
2 changes: 1 addition & 1 deletion src/kafka/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM confluentinc/cp-kafka:7.5.2

USER root
ARG version=1.31.0
ARG version=2.0.0
ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /tmp/opentelemetry-javaagent.jar
RUN chmod go+r /tmp/opentelemetry-javaagent.jar

Expand Down

0 comments on commit 22dc002

Please sign in to comment.