Blueprint-uServices / blueprint

Blueprint Microservices Compiler: Flexible and Configurable Open-Source Microservice Benchmark Applications
https://blueprint-uservices.github.io
BSD 3-Clause "New" or "Revised" License
21 stars 5 forks source link

New workloadgen not working on another application #172

Closed yl3469 closed 6 months ago

yl3469 commented 6 months ago

Hello, I am currently integrating a simple workload generator based on the Sockshop. However, after testing it by looking at Jaeger trace, I found no active spans related to the hotel workload. I have added you to a fork of the Blueprint with the changes. Would you mind helping shed some light on the potential issues? Thank you very much!

yl3469 commented 6 months ago

Dear Blueprint Developers,

Thank you again for your continued support and insights in advance. Sorry for bothering you. I was trying a modified workload generator. There seems to be an issue from the docker build due to the openTelemetry / otel version auto-resolution mismatch.

Here are my triages for your convenience. In the new build logs, the related otel versions are v1.26.0:

./build/docker/recomd_service_container/recomd_service_process/recomd_service_process/go.mod:34:        go.opentelemetry.io/otel/metric v1.26.0 // indirect
./build/docker/rate_service_container/rate_service_process/rate_service_process/go.sum:54:go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA=
./build/docker/rate_service_container/rate_service_process/rate_service_process/go.sum:55:go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0=
./build/docker/user_service_container/user_service_process/user_service_process/go.sum:52:go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA=
./build/docker/user_service_container/user_service_process/user_service_process/go.sum:53:go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0=

Earlier successful build uses v1.25.0 (for otel/metric, otel/trace or otel)

./build_bak/docker/recomd_service_container/recomd_service_process/recomd_service_process/go.mod:12:    go.opentelemetry.io/otel/trace v1.25.0
./build_bak/docker/recomd_service_container/recomd_service_process/recomd_service_process/go.mod:30:    go.opentelemetry.io/otel v1.25.0 // indirect
./build_bak/docker/recomd_service_container/recomd_service_process/recomd_service_process/go.mod:34:    go.opentelemetry.io/otel/metric v1.25.0 // indirect
./build_bak/docker/reserv_service_container/reserv_service_process/reserv_service_process/go.mod:35:    go.opentelemetry.io/otel/metric v1.25.0 // indirect
./build_bak/docker/reserv_service_container/reserv_service_process/reserv_service_process/go.mod:31:    go.opentelemetry.io/otel v1.25.0 // indirect
./build_bak/docker/reserv_service_container/reserv_service_process/reserv_service_process/go.sum:48:go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA=
./build_bak/docker/reserv_service_container/reserv_service_process/reserv_service_process/go.sum:49:go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s=

Here are the related lines in go.mod or go.sum, without any changes between the two builds:

./workflow/go.mod:15:   go.opentelemetry.io/otel v1.21.0 // indirect
./workflow/go.mod:16:   go.opentelemetry.io/otel/metric v1.21.0 // indirect
./workflow/go.mod:17:   go.opentelemetry.io/otel/trace v1.21.0 // indirect
./workflow/go.sum:21:go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
./workflow/go.sum:22:go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
./workflow/go.sum:23:go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
./workflow/go.sum:24:go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
./workflow/go.sum:25:go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
./workflow/go.sum:26:go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
./workload/go.mod:16:   go.opentelemetry.io/otel v1.21.0 // indirect
./workload/go.mod:17:   go.opentelemetry.io/otel/metric v1.21.0 // indirect
./workload/go.mod:18:   go.opentelemetry.io/otel/trace v1.21.0 // indirect
./workload/go.sum:23:go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
./workload/go.sum:24:go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
./workload/go.sum:25:go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
./workload/go.sum:26:go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
./workload/go.sum:27:go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
./workload/go.sum:28:go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=

To reproduce:

go run wiring/main.go -w original -o build
cd build
cp .local.env docker/.env
docker compose build

Here is the full error log for the docker build

[+] Building 100.6s (72/112)                                                                            docker:default
 => [geo_service_container internal] load build definition from Dockerfile                                        0.0s
 => => transferring dockerfile: 1.30kB                                                                            0.0s
 => [user_service_container] resolve image config for docker-image://docker.io/docker/dockerfile:1                0.5s
 => [reserv_service_container internal] load build definition from Dockerfile                                     0.0s
 => => transferring dockerfile: 1.33kB                                                                            0.0s
 => [profile_service_container internal] load build definition from Dockerfile                                    0.0s
 => => transferring dockerfile: 1.34kB                                                                            0.0s
 => [rate_service_container internal] load build definition from Dockerfile                                       0.0s
 => => transferring dockerfile: 1.31kB                                                                            0.0s
 => [search_service_container internal] load build definition from Dockerfile                                     0.0s
 => => transferring dockerfile: 1.33kB                                                                            0.0s
 => [user_service_container internal] load build definition from Dockerfile                                       0.0s
 => => transferring dockerfile: 1.31kB                                                                            0.0s
 => [frontend_service_container internal] load build definition from Dockerfile                                   0.0s
 => => transferring dockerfile: 1.35kB                                                                            0.0s
 => [recomd_service_container internal] load build definition from Dockerfile                                     0.0s
 => => transferring dockerfile: 1.33kB                                                                            0.0s
 => CACHED [user_service_container] docker-image://docker.io/docker/dockerfile:1@sha256:dbbd5e059e8a07ff7ea6233b  0.0s
 => [frontend_service_container internal] load metadata for docker.io/library/golang:1.21-bookworm                1.0s
 => [search_service_container internal] load metadata for gcr.io/distroless/base-debian12:latest                  0.9s
 => [profile_service_container internal] load metadata for docker.io/library/busybox:1.35.0-uclibc                0.6s
 => [recomd_service_container internal] load .dockerignore                                                        0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [geo_service_container internal] load .dockerignore                                                           0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [rate_service_container internal] load .dockerignore                                                          0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [search_service_container internal] load .dockerignore                                                        0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [frontend_service_container internal] load .dockerignore                                                      0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [user_service_container internal] load .dockerignore                                                          0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [profile_service_container internal] load .dockerignore                                                       0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [reserv_service_container internal] load .dockerignore                                                        0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [rate_service_container internal] load build context                                                          0.0s
 => => transferring context: 456.23kB                                                                             0.0s
 => [frontend_service_container rate_service_process 1/6] FROM docker.io/library/golang:1.21-bookworm@sha256:90  18.8s
 => => resolve docker.io/library/golang:1.21-bookworm@sha256:9070cb6a424004bb46987bfee510666a362d6a332a6949b33b2  0.0s
 => => sha256:9070cb6a424004bb46987bfee510666a362d6a332a6949b33b2b644a0e21d196 1.64kB / 1.64kB                    0.0s
 => => sha256:758ddc9809127da6b2b2c143f2023a16a4636aa0e34db98dfc26bb4dd9e0d706 1.79kB / 1.79kB                    0.0s
 => => sha256:1468e7ff95fcb865fbc4dee7094f8b99c4dcddd6eb2180cf044c7396baf6fc2f 49.58MB / 49.58MB                  1.0s
 => => sha256:af2d3af00e57da762d0d6e1a95ea3aa594cd6173eab0a635b3322c673a9ef88a 2.88kB / 2.88kB                    0.0s
 => => sha256:2cf9c2b42f41b1845f3e4421b723d56146db82939dc884555e077768e18132f4 24.05MB / 24.05MB                  0.5s
 => => sha256:c4c40c3e3cdf945721f480e1d939aac857876fdb5c33b8fbfcf655c63b0b9428 64.14MB / 64.14MB                  1.1s
 => => sha256:18445a9ea386c08b9cd5a46a17c8099d961d6813c6f5945e2adeb24ba596456a 92.41MB / 92.41MB                  1.6s
 => => sha256:c2c9e90aed829b7387fa3fa7121b7fda009a742719004ac50889a37665a5f08c 67.01MB / 67.01MB                  1.8s
 => => extracting sha256:1468e7ff95fcb865fbc4dee7094f8b99c4dcddd6eb2180cf044c7396baf6fc2f                         2.4s
 => => sha256:28752861b6df1c9aaf482c7b8dabcd98fdf77d6e722fa2dd82dfcddf0363158e 175B / 175B                        1.3s
 => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B                          1.5s
 => => extracting sha256:2cf9c2b42f41b1845f3e4421b723d56146db82939dc884555e077768e18132f4                         0.8s
 => => extracting sha256:c4c40c3e3cdf945721f480e1d939aac857876fdb5c33b8fbfcf655c63b0b9428                         3.2s
 => => extracting sha256:18445a9ea386c08b9cd5a46a17c8099d961d6813c6f5945e2adeb24ba596456a                         3.4s
 => => extracting sha256:c2c9e90aed829b7387fa3fa7121b7fda009a742719004ac50889a37665a5f08c                         4.7s
 => => extracting sha256:28752861b6df1c9aaf482c7b8dabcd98fdf77d6e722fa2dd82dfcddf0363158e                         0.0s
 => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                         0.0s
 => [geo_service_container stage-1 1/8] FROM gcr.io/distroless/base-debian12:latest@sha256:611d30d7f6d9992c37b1e  0.0s
 => [geo_service_container] FROM docker.io/library/busybox:1.35.0-uclibc@sha256:56e199e321da9662f39d773823cd742a  0.0s
 => [frontend_service_container internal] load build context                                                      0.0s
 => => transferring context: 583.73kB                                                                             0.0s
 => [user_service_container internal] load build context                                                          0.0s
 => => transferring context: 444.22kB                                                                             0.0s
 => [reserv_service_container internal] load build context                                                        0.0s
 => => transferring context: 466.10kB                                                                             0.0s
 => [profile_service_container internal] load build context                                                       0.0s
 => => transferring context: 458.86kB                                                                             0.0s
 => [search_service_container internal] load build context                                                        0.0s
 => => transferring context: 498.46kB                                                                             0.0s
 => [recomd_service_container internal] load build context                                                        0.0s
 => => transferring context: 448.10kB                                                                             0.0s
 => [geo_service_container internal] load build context                                                           0.0s
 => => transferring context: 443.16kB                                                                             0.0s
 => [profile_service_container profile_service_process 2/6] COPY ./profile_service_process /src                   0.2s
 => [rate_service_container rate_service_process 2/6] COPY ./rate_service_process /src                            0.2s
 => [search_service_container search_service_process 2/6] COPY ./search_service_process /src                      0.2s
 => [frontend_service_container frontend_service_process 2/6] COPY ./frontend_service_process /src                0.2s
 => [user_service_container user_service_process 2/6] COPY ./user_service_process /src                            0.2s
 => [recomd_service_container recomd_service_process 2/6] COPY ./recomd_service_process /src                      0.2s
 => [geo_service_container geo_service_process 2/6] COPY ./geo_service_process /src                               0.2s
 => [reserv_service_container reserv_service_process 2/6] COPY ./reserv_service_process /src                      0.2s
 => [reserv_service_container reserv_service_process 3/6] WORKDIR /src                                            0.0s
 => [geo_service_container geo_service_process 3/6] WORKDIR /src                                                  0.1s
 => [user_service_container user_service_process 3/6] WORKDIR /src                                                0.1s
 => [profile_service_container profile_service_process 3/6] WORKDIR /src                                          0.1s
 => [rate_service_container rate_service_process 3/6] WORKDIR /src                                                0.0s
 => [recomd_service_container recomd_service_process 3/6] WORKDIR /src                                            0.1s
 => [frontend_service_container frontend_service_process 3/6] WORKDIR /src                                        0.0s
 => [search_service_container search_service_process 3/6] WORKDIR /src                                            0.0s
 => [reserv_service_container reserv_service_process 4/6] RUN go mod download                                    36.4s
 => [geo_service_container geo_service_process 4/6] RUN go mod download                                          36.4s
 => [rate_service_container rate_service_process 4/6] RUN go mod download                                        36.4s
 => [user_service_container user_service_process 4/6] RUN go mod download                                        36.4s
 => [profile_service_container profile_service_process 4/6] RUN go mod download                                  36.4s
 => [recomd_service_container recomd_service_process 4/6] RUN go mod download                                    36.4s
 => [frontend_service_container frontend_service_process 4/6] RUN go mod download                                36.3s
 => [search_service_container search_service_process 4/6] RUN go mod download                                    36.3s
 => [profile_service_container profile_service_process 5/6] RUN mkdir /profile_service_process                    1.2s
 => [user_service_container user_service_process 5/6] RUN mkdir /user_service_process                             1.2s
 => [rate_service_container rate_service_process 5/6] RUN mkdir /rate_service_process                             1.2s
 => [geo_service_container geo_service_process 5/6] RUN mkdir /geo_service_process                                0.3s
 => [frontend_service_container frontend_service_process 5/6] RUN mkdir /frontend_service_process                 0.5s
 => [reserv_service_container reserv_service_process 5/6] RUN mkdir /reserv_service_process                       1.2s
 => [recomd_service_container recomd_service_process 5/6] RUN mkdir /recomd_service_process                       0.7s
 => [search_service_container search_service_process 5/6] RUN mkdir /search_service_process                       1.1s
 => CANCELED [geo_service_container geo_service_process 6/6] RUN go build -o /geo_service_process ./geo_service  43.1s
 => ERROR [frontend_service_container frontend_service_process 6/6] RUN go build -o /frontend_service_process .  42.4s
 => CANCELED [recomd_service_container recomd_service_process 6/6] RUN go build -o /recomd_service_process ./re  42.5s
 => CANCELED [search_service_container search_service_process 6/6] RUN go build -o /search_service_process ./se  42.6s
 => CANCELED [profile_service_container profile_service_process 6/6] RUN go build -o /profile_service_process .  42.5s
 => CANCELED [reserv_service_container reserv_service_process 6/6] RUN go build -o /reserv_service_process ./re  42.2s
 => CANCELED [user_service_container user_service_process 6/6] RUN go build -o /user_service_process ./user_ser  42.4s
 => CANCELED [rate_service_container rate_service_process 6/6] RUN go build -o /rate_service_process ./rate_ser  42.1s
------
 > [frontend_service_container frontend_service_process 6/6] RUN go build -o /frontend_service_process ./frontend_service_process:
37.33 # go.opentelemetry.io/otel/sdk/trace
37.33 /go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.21.0/trace/span.go:165:20: cannot use (*recordingSpan)(nil) (value of type *recordingSpan) as ReadWriteSpan value in variable declaration: *recordingSpan does not implement ReadWriteSpan (missing method AddLink)
37.33 /go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.21.0/trace/span.go:787:20: cannot use nonRecordingSpan{} (value of type nonRecordingSpan) as "go.opentelemetry.io/otel/trace".Span value in variable declaration: nonRecordingSpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)
37.33 /go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.21.0/trace/tracer.go:50:21: impossible type assertion: p.(*recordingSpan)
37.33   *recordingSpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)
37.33 /go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.21.0/trace/tracer.go:120:10: cannot use tr.newNonRecordingSpan(sc) (value of type nonRecordingSpan) as "go.opentelemetry.io/otel/trace".Span value in return statement: nonRecordingSpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)
37.33 /go/pkg/mod/go.opentelemetry.io/otel/sdk@v1.21.0/trace/tracer.go:122:9: cannot use tr.newRecordingSpan(psc, sc, name, samplingResult, config) (value of type *recordingSpan) as "go.opentelemetry.io/otel/trace".Span value in return statement: *recordingSpan does not implement "go.opentelemetry.io/otel/trace".Span (missing method AddLink)
------
failed to solve: process "/bin/sh -c go build -o /frontend_service_process ./frontend_service_process" did not complete successfully: exit code: 1

Could you help shed some light on what could be a suggested methodologies to avoid the related issues with minimal subset of version changes that can be future-proof of automatic upgrades?

vaastav commented 6 months ago

Hi,

We have fixed the otel version mismatch issue in #174 and we don't anticipate this issue to arise again. As part of #174 , we have also added a very simple workload generator for Sockshop and Hotel Reservation that makes simple requests at 1 request per second to demonstrate how to use a workload generator with an application. Please consider using the latest version of BLueprint.

Thank you for bringing the issues to our attention :)