From 5f8a8e9cb0bc7c1ef5e0c04b5162a9eba53186b3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 16:24:43 -0500 Subject: [PATCH 1/3] chore(deps): update plugin com.github.johnrengelman.shadow to v8 (#1260) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Austin Parker --- src/frauddetectionservice/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frauddetectionservice/build.gradle.kts b/src/frauddetectionservice/build.gradle.kts index 8b2ed1dda5..10cde2b7fb 100644 --- a/src/frauddetectionservice/build.gradle.kts +++ b/src/frauddetectionservice/build.gradle.kts @@ -8,7 +8,7 @@ plugins { id("java") id("idea") id("com.google.protobuf") version "0.9.4" - id("com.github.johnrengelman.shadow") version "7.1.2" + id("com.github.johnrengelman.shadow") version "8.1.1" } group = "io.opentelemetry" From 1ce768f965f5f0950e5233af66a6a9264a63cd6b Mon Sep 17 00:00:00 2001 From: Petr Styblo Date: Wed, 29 Nov 2023 10:05:25 +0100 Subject: [PATCH 2/3] currencyservice: update opentelemetry-cpp to 1.12.0 (#1275) --- CHANGELOG.md | 2 ++ src/currencyservice/Dockerfile | 2 +- src/currencyservice/src/meter_common.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c024a49838..3cfe2273b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ release. ## Unreleased +* [currencyservice]: update opentelemetry-cpp to 1.12.0 + ([#1275](https://github.com/open-telemetry/opentelemetry-demo/pull/1275)) * update loadgenerator dependencies and the base image ([#1274](https://github.com/open-telemetry/opentelemetry-demo/pull/1274)) * add env var for pinning trace-based test tool version diff --git a/src/currencyservice/Dockerfile b/src/currencyservice/Dockerfile index bb5b998221..9b0a85f855 100644 --- a/src/currencyservice/Dockerfile +++ b/src/currencyservice/Dockerfile @@ -19,7 +19,7 @@ FROM alpine RUN apk update RUN apk add git cmake make g++ grpc-dev re2-dev protobuf-dev c-ares-dev -ARG OPENTELEMETRY_CPP_VERSION=1.10.0 +ARG OPENTELEMETRY_CPP_VERSION=1.12.0 RUN git clone https://github.com/open-telemetry/opentelemetry-cpp \ && cd opentelemetry-cpp/ \ diff --git a/src/currencyservice/src/meter_common.h b/src/currencyservice/src/meter_common.h index 4deae86fa9..6167e9edfb 100644 --- a/src/currencyservice/src/meter_common.h +++ b/src/currencyservice/src/meter_common.h @@ -26,7 +26,7 @@ namespace otlp_exporter::OtlpGrpcMetricExporterOptions otlpOptions; // Configuration via environment variable not supported yet - otlpOptions.aggregation_temporality = metric_sdk::AggregationTemporality::kDelta; + otlpOptions.aggregation_temporality = otlp_exporter::PreferredAggregationTemporality::kDelta; auto exporter = otlp_exporter::OtlpGrpcMetricExporterFactory::Create(otlpOptions); // Build MeterProvider and Reader From 1bb33240a26cd7519412262d55c330fc39b738b8 Mon Sep 17 00:00:00 2001 From: Petr Styblo Date: Wed, 29 Nov 2023 17:06:33 +0100 Subject: [PATCH 3/3] currencyservice: bring back multistage build (#1276) --- CHANGELOG.md | 2 ++ src/currencyservice/Dockerfile | 27 ++++++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cfe2273b1..6d7ee6f26b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ release. ## Unreleased +* [currencyservice] bring back multistage build + ([#1276](https://github.com/open-telemetry/opentelemetry-demo/pull/1276)) * [currencyservice]: update opentelemetry-cpp to 1.12.0 ([#1275](https://github.com/open-telemetry/opentelemetry-demo/pull/1275)) * update loadgenerator dependencies and the base image diff --git a/src/currencyservice/Dockerfile b/src/currencyservice/Dockerfile index 9b0a85f855..3f470fad9c 100644 --- a/src/currencyservice/Dockerfile +++ b/src/currencyservice/Dockerfile @@ -14,22 +14,21 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine +FROM alpine as builder -RUN apk update -RUN apk add git cmake make g++ grpc-dev re2-dev protobuf-dev c-ares-dev +RUN apk update && apk add git cmake make g++ grpc-dev protobuf-dev ARG OPENTELEMETRY_CPP_VERSION=1.12.0 RUN git clone https://github.com/open-telemetry/opentelemetry-cpp \ - && cd opentelemetry-cpp/ \ - && git checkout tags/v${OPENTELEMETRY_CPP_VERSION} -b v${OPENTELEMETRY_CPP_VERSION} \ - && mkdir build \ - && cd build \ - && cmake .. -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ - -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \ - -DWITH_EXAMPLES=OFF -DWITH_OTLP_GRPC=ON \ - && make -j$(nproc || sysctl -n hw.ncpu || echo 1) install && cd ../.. && rm -rf opentelemetry-cpp + && cd opentelemetry-cpp/ \ + && git checkout tags/v${OPENTELEMETRY_CPP_VERSION} -b v${OPENTELEMETRY_CPP_VERSION} \ + && mkdir build \ + && cd build \ + && cmake .. -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \ + -DWITH_EXAMPLES=OFF -DWITH_OTLP_GRPC=ON \ + && make -j$(nproc || sysctl -n hw.ncpu || echo 1) install && cd ../.. COPY . /currencyservice @@ -38,5 +37,11 @@ RUN cd /currencyservice \ && cmake .. \ && make -j$(nproc || sysctl -n hw.ncpu || echo 1) install + +FROM alpine as release + +RUN apk update && apk add grpc-dev protobuf-dev +COPY --from=builder /usr/local /usr/local + EXPOSE ${CURRENCY_SERVICE_PORT} ENTRYPOINT ./usr/local/bin/currencyservice ${CURRENCY_SERVICE_PORT}