forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
22 changed files
with
10,588 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set -e # Exit immediately if a command exits with a non-zero status. | ||
set -x # Print commands and their arguments as they are executed | ||
|
||
# This script is used to generate protobuf files for all services with Docker. | ||
|
||
gen_proto_go() { | ||
echo "Generating Go protobuf files for $1" | ||
docker build -f "src/$1/genproto/Dockerfile" -t "$1-genproto" . | ||
docker run --rm -v $(pwd):/build "$1-genproto" \ | ||
protoc -I /build/pb /build/pb/demo.proto --go_out="./src/$1/" --go-grpc_out="./src/$1/" | ||
} | ||
|
||
gen_proto_python() { | ||
echo "Generating Python protobuf files for $1" | ||
docker build -f "src/$1/genproto/Dockerfile" -t "$1-genproto" . | ||
docker run --rm -v $(pwd):/build "$1-genproto" \ | ||
python -m grpc_tools.protoc -I /build/pb/ --python_out="./src/$1/" --grpc_python_out="./src/$1/" /build/pb/demo.proto | ||
} | ||
|
||
#gen_proto_dotnet accountingservice | ||
#gen_proto_java adservice | ||
#gen_proto_dotnet cartservice | ||
gen_proto_go checkoutservice | ||
#gen_proto_cpp currencyservice | ||
#gen_proto_ruby emailservice | ||
#gen_proto_ts frontend | ||
#gen_proto_js paymentservice | ||
gen_proto_go productcatalogservice | ||
#gen_proto_php quoteservice | ||
gen_proto_python recommendationservice | ||
#gen_proto_rust shippingservice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
FROM golang:1.22-alpine | ||
|
||
WORKDIR /build | ||
|
||
RUN apk add --no-cache protobuf-dev | ||
|
||
COPY ./src/checkoutservice/go.mod ./ | ||
COPY ./src/checkoutservice/go.sum ./ | ||
COPY ./src/checkoutservice/tools.go ./ | ||
|
||
RUN go env -w GOMODCACHE=/root/.cache/go-build | ||
RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
go list -e -f '{{range .Imports}}{{.}} {{end}}' tools.go | CGO_ENABLED=0 xargs go install -mod=readonly |
Oops, something went wrong.