Skip to content

Commit

Permalink
Merge branch 'main' into frauddetectionservice-update-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
austinlparker authored Jul 21, 2023
2 parents 9ee4648 + ac78734 commit 4d94954
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
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:17-jre

ARG version=1.24.0
ARG version=1.28.0
WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/ ./
Expand Down
17 changes: 9 additions & 8 deletions src/adservice/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

plugins {
id 'com.google.protobuf' version '0.8.18'
id 'com.google.protobuf' version '0.9.4'
id 'com.github.sherter.google-java-format' version '0.9'
id 'idea'
id 'application'
id 'com.github.ben-manes.versions' version '0.47.0'
}

repositories {
Expand All @@ -15,10 +16,10 @@ description = 'Ad Service'
group = "adservice"
version = "0.1.0-SNAPSHOT"

def opentelemetryVersion = "1.19.0"
def opentelemetryInstrumentationAlphaVersion = "1.19.1-alpha"
def grpcVersion = "1.45.1"
def jacksonVersion = "2.13.2"
def opentelemetryVersion = "1.28.0"
def opentelemetryInstrumentationAlphaVersion = "1.28.0-alpha"
def grpcVersion = "1.56.1"
def jacksonVersion = "2.15.2"
def protocVersion = "3.20.0"

tasks.withType(JavaCompile) {
Expand All @@ -38,7 +39,7 @@ dependencies {
implementation platform("io.opentelemetry:opentelemetry-bom:${opentelemetryVersion}")
implementation platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:${opentelemetryInstrumentationAlphaVersion}")

implementation "com.google.api.grpc:proto-google-common-protos:2.8.0",
implementation "com.google.api.grpc:proto-google-common-protos:2.22.0",
"javax.annotation:javax.annotation-api:1.3.2",
"io.grpc:grpc-protobuf:${grpcVersion}",
"io.grpc:grpc-stub:${grpcVersion}",
Expand All @@ -47,11 +48,11 @@ dependencies {
"io.opentelemetry:opentelemetry-api",
"io.opentelemetry:opentelemetry-sdk",
"io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations",
"org.apache.logging.log4j:log4j-core:2.17.2"
"org.apache.logging.log4j:log4j-core:2.20.0"

runtimeOnly "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}",
"com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}",
"io.netty:netty-tcnative-boringssl-static:2.0.51.Final"
"io.netty:netty-tcnative-boringssl-static:2.0.61.Final"
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/adservice/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Wed Jul 19 11:27:42 EDT 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
24 changes: 12 additions & 12 deletions src/adservice/src/main/java/oteldemo/AdService.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package oteldemo;

import com.google.common.collect.ImmutableListMultimap;
import com.google.common.collect.Iterables;
import oteldemo.Demo.Ad;
import oteldemo.Demo.AdRequest;
import oteldemo.Demo.AdResponse;
import oteldemo.Demo.GetFlagResponse;
import oteldemo.FeatureFlagServiceGrpc.FeatureFlagServiceBlockingStub;
import io.grpc.*;
import io.grpc.health.v1.HealthCheckResponse.ServingStatus;
import io.grpc.protobuf.services.*;
Expand All @@ -36,6 +31,11 @@
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import oteldemo.Demo.Ad;
import oteldemo.Demo.AdRequest;
import oteldemo.Demo.AdResponse;
import oteldemo.Demo.GetFlagResponse;
import oteldemo.FeatureFlagServiceGrpc.FeatureFlagServiceBlockingStub;

public final class AdService {

Expand Down Expand Up @@ -73,12 +73,12 @@ private void start() throws IOException {
healthMgr = new HealthStatusManager();

String featureFlagServiceAddr =
Optional.ofNullable(System.getenv("FEATURE_FLAG_GRPC_SERVICE_ADDR"))
.orElse("");
Optional.ofNullable(System.getenv("FEATURE_FLAG_GRPC_SERVICE_ADDR")).orElse("");
FeatureFlagServiceBlockingStub featureFlagServiceStub = null;
if (!featureFlagServiceAddr.isEmpty()) {
featureFlagServiceStub = oteldemo.FeatureFlagServiceGrpc.newBlockingStub(
ManagedChannelBuilder.forTarget(featureFlagServiceAddr).usePlaintext().build());
featureFlagServiceStub =
oteldemo.FeatureFlagServiceGrpc.newBlockingStub(
ManagedChannelBuilder.forTarget(featureFlagServiceAddr).usePlaintext().build());
}

server =
Expand Down

0 comments on commit 4d94954

Please sign in to comment.