Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opensearch monitoring prometheus metrics #54

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
9c867b5
fix data-prepper image to a stable version
YANG-DB Jun 21, 2023
d9f0bae
add error wrapping for integration script
YANG-DB Jun 21, 2023
04d9489
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jun 21, 2023
0aeef46
update opensearch version configuration as an env var
YANG-DB Jun 21, 2023
ffd3aeb
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jun 27, 2023
f70840a
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jun 27, 2023
3c7045c
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jun 27, 2023
2ce8f34
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jul 7, 2023
36c1388
update opensearch to 2.8
YANG-DB Jul 7, 2023
51a4d85
Merge remote-tracking branch 'origin/main'
YANG-DB Jul 8, 2023
f05c408
Merge branch 'opensearch-project:main' into main
YANG-DB Jul 8, 2023
c1e66b8
[frontendproxy] Add opentelemetry_collector_http to envoy's cluster a…
chigia001 Jul 10, 2023
5a05737
splitting up services into modules (#872)
joshleecreates Jul 10, 2023
c7588d4
Add trace based testing examples (#877)
danielbdias Jul 10, 2023
ec804cc
fix frontend tests (#950)
danielbdias Jul 10, 2023
814a4e9
[cartservice] Update OTel .NET to 1.5.1 (#957)
Kielek Jul 10, 2023
9f8806f
[chore] build images for PRs (#955)
pellared Jul 13, 2023
bd4fdde
Merge branch 'opensearch-project:main' into main
YANG-DB Jul 15, 2023
28a6c74
[shippingservice] Update Rust deps and add TelemetryResourceDetector …
julianocosta89 Jul 17, 2023
092ee18
shippingservice-missing-cargolock-update (#982)
julianocosta89 Jul 17, 2023
90d63ec
Merge branch 'opensearch-project:main' into main
YANG-DB Jul 18, 2023
73a2e0f
Merge branch 'main' into opensearch-monitoring-prometheus-metrics
YANG-DB Jul 18, 2023
0e8fec0
update locust to use nginx proxy
YANG-DB Jul 18, 2023
2fb8bb1
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jul 18, 2023
f174613
fix: update frontendproxy's env for minimal (#983)
chigia001 Jul 18, 2023
1296ae1
chore: update JS dependency (#978)
chigia001 Jul 18, 2023
556b1f2
Run Checks on main (#973)
pellared Jul 18, 2023
9ae9528
Fix flaky cartservice build (#984)
austinlparker Jul 19, 2023
c9c6fb8
rollback to dnf6 (#990)
austinlparker Jul 21, 2023
ac78734
Update AdService Dependencies (#986)
austinlparker Jul 21, 2023
25800da
[FraudDetectionService] update dependencies (#987)
julianocosta89 Jul 21, 2023
0831bc6
[LoadGenerator & RecommendatationService] update dependencies (#988)
julianocosta89 Jul 21, 2023
fbc5308
Update Email Service Dependencies (#989)
austinlparker Jul 21, 2023
3bcf333
[currencyService] Update OTel dependency (#991)
julianocosta89 Jul 21, 2023
dc37327
[FeatureFlagService] Update dependencies (#992)
julianocosta89 Jul 21, 2023
5a33eba
update collector to build image using ocb (#944)
Jul 21, 2023
78604e0
fix(tests): removing analyzer-rules as required gate for Tracebasedte…
xoscar Jul 21, 2023
854d219
fix(tests): updating valid card validation expected status code (#998)
xoscar Jul 22, 2023
8c57e94
chore(deps): update dependency stackexchange.redis to v2.6.122 (#1004)
renovate[bot] Jul 23, 2023
e59b5ef
fix(tests): removing unused env var on trace-based tests (#1002)
danielbdias Jul 23, 2023
2ee9658
TARGETARCH cannot have a default value, and set GOARCH similarly (#1014)
mdonkers Jul 24, 2023
6f25e2b
chore: Update PHP Dependencies (#1009)
calmius Jul 24, 2023
436a96e
update readme (#1016)
cartersocha Jul 25, 2023
4a85c29
chore(deps): update dependency click to v8.1.6 (#999)
renovate[bot] Jul 28, 2023
495913a
chore(deps): update dependency deprecated to v1.2.14 (#1003)
renovate[bot] Jul 28, 2023
b4bc58b
chore(deps): update docker/build-push-action action to v3.3.1 (#1005)
renovate[bot] Jul 28, 2023
6724377
fix(deps): update dependency com.google.api.grpc:proto-google-common-…
renovate[bot] Jul 28, 2023
aac3f3b
chore(deps): update dependency configargparse to v1.5.5 (#1000)
renovate[bot] Jul 31, 2023
a80a326
chore(deps): update dotnet monorepo (#1006)
renovate[bot] Jul 31, 2023
a550aed
wrapper-validation-action from 1.0.6 to 1.1.0 (#1026)
julianocosta89 Aug 1, 2023
81afeef
chore(deps): update opentelemetry-dotnet monorepo to v1.5.1 (#1008)
renovate[bot] Aug 1, 2023
05d7270
fix(deps): update dependency @grpc/grpc-js to v1.8.18 (#1010)
renovate[bot] Aug 1, 2023
822d00d
fix(deps): update dependency cookies-next to v2.1.2 (#1022)
renovate[bot] Aug 1, 2023
df52d08
fix(deps): update dependency org.apache.kafka:kafka-clients to v3.5.1…
renovate[bot] Aug 1, 2023
0a5825b
fix(deps): update dependency php-di/php-di to v7.0.3 (#1024)
renovate[bot] Aug 1, 2023
8264d5f
Merge remote-tracking branch 'upstream/main' into opensearch-monitori…
YANG-DB Aug 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ FRONTEND_PROXY_ADDR=frontend-proxy:${ENVOY_PORT}
# Load Generator
LOCUST_WEB_PORT=8089
LOCUST_USERS=10
LOCUST_HOST=http://${FRONTEND_PROXY_ADDR}
LOCUST_HOST=http://${NGINX_ADDR}
LOCUST_WEB_HOST=loadgenerator
LOCUST_AUTOSTART=true
LOCUST_HEADLESS=false
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
- file: ./src/loadgenerator/Dockerfile
tag_suffix: loadgenerator
context: ./
- file: ./src/otelcollector/Dockerfile
tag_suffix: otelcollector
context: ./
- file: ./src/paymentservice/Dockerfile
tag_suffix: paymentservice
context: ./
Expand Down Expand Up @@ -111,6 +114,8 @@ jobs:

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:master

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -120,7 +125,7 @@ jobs:
max-parallelism = 2

- name: Matrix Build and push demo images
uses: docker/[email protected].0
uses: docker/[email protected].1
with:
context: ${{ matrix.file_tag.context }}
file: ${{ matrix.file_tag.file }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
name: Checks

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build_images:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: gradle/wrapper-validation-action@v1.0.6
- uses: gradle/wrapper-validation-action@v1.1.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ src/shippingservice/target/
/src/featureflagservice/src/ffs_demo_pb.erl
/src/featureflagservice/src/ffs_service_*.erl
/src/featureflagservice/src/oteldemo_*.erl
/src/frauddetectionservice/src/main/proto
/src/frontend/pb/
/src/frontend/protos/
/src/paymentservice/demo.proto
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,24 @@ release.
([#872](https:/open-telemetry/opentelemetry-demo/pull/872))
* [frontendproxy]Envoy expose a route for the collector to route frontend spans
([#938](https:/open-telemetry/opentelemetry-demo/pull/938))
* [frontend] update JS SDKs to 1.15.0/0.41.0
([#853](https:/open-telemetry/opentelemetry-demo/pull/853))
* [shippingservice] Update Rust dependencies and add TelemetryResourceDetector
([#972](https:/open-telemetry/opentelemetry-demo/pull/972))
* Update frontendproxy's env for minimal
([#983](https:/open-telemetry/opentelemetry-demo/pull/983))
* [FeatureFlagService] Update dependencies
([#992](https:/open-telemetry/opentelemetry-demo/pull/992))
* [currencyService] Update OTel dependency
([#991](https:/open-telemetry/opentelemetry-demo/pull/991))
* [LoadGenerator & RecommendatationService] update dependencies
([#988](https:/open-telemetry/opentelemetry-demo/pull/988))
* [FraudDetectionService] Updated Kotlin version and OTel dependencies
([#987](https:/open-telemetry/opentelemetry-demo/pull/987))
* [otelcol] Use the collector builder to produce otelcol docker image
([#944](https:/open-telemetry/opentelemetry-demo/pull/944))
* [quoteservice] update php dependencies
([#994](https:/open-telemetry/opentelemetry-demo/issues/994))

## 1.4.0

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ We welcome any vendor to fork the project to demonstrate their services and
adding a link below. The community is committed to maintaining the project and
keeping it up to date for you.

| | | |
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [AlibabaCloud LogService](https:/aliyun-sls/opentelemetry-demo) | [Elastic](https:/elastic/opentelemetry-demo) | [OpenSearch](https:/opensearch-project/opentelemetry-demo) |
| [AppDynamics](https://www.appdynamics.com/blog/cloud/how-to-observe-opentelemetry-demo-app-in-appdynamics-cloud/) | [Grafana Labs](https:/grafana/opentelemetry-demo) | [Sentry](https://github.com/getsentry/opentelemetry-demo) |
| [Aspecto](https:/aspecto-io/opentelemetry-demo) | [Helios](https://otelsandbox.gethelios.dev) | [Splunk](https:/signalfx/opentelemetry-demo) |
| [Axiom](https://play.axiom.co/axiom-play-qf1k/dashboards/otel.traces.otel-demo-traces) | [Honeycomb.io](https:/honeycombio/opentelemetry-demo) | [Sumo Logic](https://www.sumologic.com/blog/common-opentelemetry-demo-application/) |
| [Azure Data Explorer](https:/Azure/Azure-kusto-opentelemetry-demo) | [Instana](https:/instana/opentelemetry-demo) | [TelemetryHub](https:/TelemetryHub/opentelemetry-demo/tree/telemetryhub-backend) |
| [Coralogix](https://coralogix.com/blog/configure-otel-demo-send-telemetry-data-coralogix) | [Kloudfuse](https:/kloudfuse/opentelemetry-demo) | [Teletrace](https:/teletrace/opentelemetry-demo) |
| [Datadog](https:/DataDog/opentelemetry-demo) | [Lightstep](https:/lightstep/opentelemetry-demo) | [Uptrace](https:/uptrace/uptrace/tree/master/example/opentelemetry-demo) |
| [Dynatrace](https://www.dynatrace.com/news/blog/opentelemetry-demo-application-with-dynatrace/) | [New Relic](https:/newrelic/opentelemetry-demo) | |
| | | |
|-------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
| [AlibabaCloud LogService](https:/aliyun-sls/opentelemetry-demo) | [Elastic](https:/elastic/opentelemetry-demo) | [Sentry](https:/getsentry/opentelemetry-demo) |
| [AppDynamics](https://www.appdynamics.com/blog/cloud/how-to-observe-opentelemetry-demo-app-in-appdynamics-cloud/) | [Grafana Labs](https:/grafana/opentelemetry-demo) | [ServiceNow Cloud Observability](https://docs.lightstep.com/otel/quick-start-operator#send-data-from-the-opentelemetry-demo) |
| [Aspecto](https:/aspecto-io/opentelemetry-demo) | [Helios](https://otelsandbox.gethelios.dev) | [Splunk](https:/signalfx/opentelemetry-demo) |
| [Axiom](https://play.axiom.co/axiom-play-qf1k/dashboards/otel.traces.otel-demo-traces) | [Honeycomb.io](https:/honeycombio/opentelemetry-demo) | [Sumo Logic](https://www.sumologic.com/blog/common-opentelemetry-demo-application/) |
| [Azure Data Explorer](https:/Azure/Azure-kusto-opentelemetry-demo) | [Instana](https:/instana/opentelemetry-demo) | [TelemetryHub](https:/TelemetryHub/opentelemetry-demo/tree/telemetryhub-backend) |
| [Coralogix](https://coralogix.com/blog/configure-otel-demo-send-telemetry-data-coralogix) | [Kloudfuse](https:/kloudfuse/opentelemetry-demo) | [Teletrace](https:/teletrace/opentelemetry-demo) |
| [Datadog](https:/DataDog/opentelemetry-demo) | [New Relic](https:/newrelic/opentelemetry-demo) | [Uptrace](https:/uptrace/uptrace/tree/master/example/opentelemetry-demo) |
| [Dynatrace](https://www.dynatrace.com/news/blog/opentelemetry-demo-application-with-dynatrace/) | [OpenSearch](https:/opensearch-project/opentelemetry-demo) | |

## Contributing

Expand Down
4 changes: 3 additions & 1 deletion docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ services:
- JAEGER_SERVICE_HOST
- OTEL_COLLECTOR_HOST
- OTEL_COLLECTOR_PORT_GRPC
- OTEL_COLLECTOR_PORT_HTTP
- ENVOY_PORT
depends_on:
frontend:
Expand Down Expand Up @@ -288,7 +289,8 @@ services:
- LOCUST_HOST
- LOCUST_HEADLESS
- LOCUST_AUTOSTART
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=loadgenerator
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
Expand Down
63 changes: 15 additions & 48 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,47 +320,6 @@
condition: service_started
logging: *logging

# Frontend Proxy (Envoy)
frontendproxy:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontendproxy
container_name: frontend-proxy
build:
context: ./
dockerfile: src/frontendproxy/Dockerfile
deploy:
resources:
limits:
memory: 50M
ports:
- "${ENVOY_PORT}:${ENVOY_PORT}"
- 10000:10000
environment:
- FRONTEND_PORT
- FRONTEND_HOST
- FEATURE_FLAG_SERVICE_PORT
- FEATURE_FLAG_SERVICE_HOST
- LOCUST_WEB_HOST
- LOCUST_WEB_PORT
- GRAFANA_SERVICE_PORT
- GRAFANA_SERVICE_HOST
- JAEGER_SERVICE_PORT
- JAEGER_SERVICE_HOST
- OTEL_COLLECTOR_HOST
- OTEL_COLLECTOR_PORT_GRPC
- OTEL_COLLECTOR_PORT_HTTP
- ENVOY_PORT
depends_on:
frontend:
condition: service_started
featureflagservice:
condition: service_started
loadgenerator:
condition: service_started
jaeger:
condition: service_started
grafana:
condition: service_started

# Load Generator
loadgenerator:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator
Expand All @@ -383,7 +342,8 @@
- LOCUST_HOST
- LOCUST_HEADLESS
- LOCUST_AUTOSTART
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=loadgenerator
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
Expand Down Expand Up @@ -726,8 +686,13 @@

# OpenTelemetry Collector
otelcol:
image: otel/opentelemetry-collector-contrib:0.76.1
image: ${IMAGE_NAME}:${IMAGE_VERSION}-otelcol
container_name: otel-col
build:
context: ./
dockerfile: ./src/otelcollector/Dockerfile
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-otelcol
deploy:
resources:
limits:
Expand Down Expand Up @@ -773,25 +738,27 @@
logging: *logging

# OpenSearch store - node1
opensearch-node1: # This is also the hostname of the container within the Docker network (i.e. https://opensearch-node1/)

Check warning on line 741 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

741:21 [comments] too few spaces before comment

Check warning on line 741 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

741:21 [comments] too few spaces before comment
image: opensearchproject/opensearch:2.8.0 # Specifying the latest available image - modify if you want a specific version
container_name: opensearch-node1
build:
context: ./
dockerfile: ./src/opensearch/Dockerfile
environment:
- cluster.name=opensearch-cluster # Name the cluster

Check warning on line 747 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

747:41 [comments] too few spaces before comment

Check warning on line 747 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

747:41 [comments] too few spaces before comment
- node.name=opensearch-node1 # Name the node that will run in this container

Check warning on line 748 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

748:36 [comments] too few spaces before comment

Check warning on line 748 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

748:36 [comments] too few spaces before comment
- discovery.seed_hosts=opensearch-node1,opensearch-node2 # Nodes to look for when discovering the cluster

Check warning on line 749 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

749:64 [comments] too few spaces before comment

Check warning on line 749 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

749:64 [comments] too few spaces before comment
- cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 # Nodes eligible to serve as cluster manager

Check warning on line 750 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

750:81 [comments] too few spaces before comment

Check warning on line 750 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

750:81 [comments] too few spaces before comment
- bootstrap.memory_lock=true # Disable JVM heap memory swapping

Check warning on line 751 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

751:36 [comments] too few spaces before comment

Check warning on line 751 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

751:36 [comments] too few spaces before comment
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM

Check warning on line 752 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

752:50 [comments] too few spaces before comment

Check warning on line 752 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

752:50 [comments] too few spaces before comment
ulimits:
memlock:
soft: -1 # Set memlock to unlimited (no soft or hard limit)

Check warning on line 755 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

755:18 [comments] too few spaces before comment

Check warning on line 755 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

755:18 [comments] too few spaces before comment
hard: -1
nofile:
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536

Check warning on line 758 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

758:21 [comments] too few spaces before comment

Check warning on line 758 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

758:21 [comments] too few spaces before comment
hard: 65536
volumes:
- opensearch-data1:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container

Check warning on line 761 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

761:53 [comments] too few spaces before comment

Check warning on line 761 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / yamllint

761:53 [comments] too few spaces before comment
healthcheck:
test: ["CMD", "curl", "-f", "https://opensearch-node1:9200/_cluster/health?wait_for_status=yellow", "-ku admin:admin"]
interval: 5s
Expand All @@ -803,8 +770,10 @@

# OpenSearch store - node2
opensearch-node2:
image: opensearchproject/opensearch:2.8.0 # This should be the same image used for opensearch-node1 to avoid issues
container_name: opensearch-node2
build:
context: ./
dockerfile: ./src/opensearch/Dockerfile
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node2
Expand All @@ -824,7 +793,7 @@

# OpenSearch store - dashboard
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:2.8.0 # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
image: opensearchproject/opensearch-dashboards:${VERSION} # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
container_name: opensearch-dashboards
ports:
- 5601:5601 # Map host port 5601 to container port 5601
Expand Down Expand Up @@ -980,8 +949,6 @@
interval: 1s
timeout: 3s
retries: 60
environment:
TRACETEST_DEV: ${TRACETEST_DEV}

tracetest-postgres:
image: postgres:14
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: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.2"
def jacksonVersion = "2.13.4.1"
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.1",
"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
12 changes: 8 additions & 4 deletions src/cartservice/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.

# https://mcr.microsoft.com/v2/dotnet/sdk/tags/list
FROM mcr.microsoft.com/dotnet/sdk:7.0.304 AS builder
FROM mcr.microsoft.com/dotnet/sdk:6.0.412 AS builder

WORKDIR /usr/src/app/

Expand All @@ -25,13 +25,17 @@ COPY ./pb/ ./src/protos/
RUN \
RUNTIME_IDENTIIFER=linux-musl-x64; \
if [ "$(uname -m)" = "aarch64" ]; then RUNTIME_IDENTIIFER=linux-musl-arm64; fi; \
dotnet restore ./src/cartservice.csproj -r $RUNTIME_IDENTIIFER && \
dotnet publish ./src/cartservice.csproj -p:PublishSingleFile=true -r $RUNTIME_IDENTIIFER --self-contained true -p:PublishTrimmed=False -p:TrimMode=Link -c Release -o /cartservice --no-restore
dotnet restore ./src/cartservice.csproj -v d -r $RUNTIME_IDENTIIFER

RUN \
RUNTIME_IDENTIIFER=linux-musl-x64; \
if [ "$(uname -m)" = "aarch64" ]; then RUNTIME_IDENTIIFER=linux-musl-arm64; fi; \
dotnet publish ./src/cartservice.csproj -v d -p:PublishSingleFile=true -r $RUNTIME_IDENTIIFER --self-contained true -p:PublishTrimmed=False -p:TrimMode=Link -c Release -o /cartservice --no-restore

# -----------------------------------------------------------------------------

# https://mcr.microsoft.com/v2/dotnet/runtime-deps/tags/list
FROM mcr.microsoft.com/dotnet/runtime-deps:7.0.7-alpine3.17
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0.15-alpine3.16

WORKDIR /usr/src/app/
COPY --from=builder /cartservice/ ./
Expand Down
Loading
Loading