From db160c490c401772a6e471868830498183807957 Mon Sep 17 00:00:00 2001 From: Carter Socha <43380952+cartersocha@users.noreply.github.com> Date: Sat, 17 Sep 2022 22:02:31 -0700 Subject: [PATCH 1/3] update go product catalog (#373) --- docs/trace_service_features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/trace_service_features.md b/docs/trace_service_features.md index 59d857fc3d..5f2dab38ca 100644 --- a/docs/trace_service_features.md +++ b/docs/trace_service_features.md @@ -16,7 +16,7 @@ Emoji Legend | Feature Flag | Erlang / Elixir | :100: | :construction: | :construction: | :no_bell: | :no_bell: | :no_bell: | | Frontend | JavaScript | :100: | :100: | :100: | :no_bell: | :100: | :100: | | Payment | JavaScript | :100: | :100: | :100: | :no_bell: | :no_bell: | :100: | -| Product Catalog | Go | :100: | :construction: | :100: | :no_bell: | :no_bell: | :no_bell: | +| Product Catalog | Go | :100: | :no_bell: | :100: | :no_bell: | :no_bell: | :no_bell: | | Quote Service | PHP | :100: | :100: | :100: | :no_bell: | :no_bell: | :no_bell: | | Recommendation | Python | :100: | :100: | :100: | :no_bell: | :no_bell: | :no_bell: | | Shipping | Rust | :no_bell: | :100: | :100: | :100: | :no_bell: | :no_bell: | From 9f097aa5344a2c3230ec25689bf47e68d015e29d Mon Sep 17 00:00:00 2001 From: Juliano Costa Date: Mon, 19 Sep 2022 15:17:32 +0200 Subject: [PATCH 2/3] Add php mermaid (#374) * Add PHP to Mermaid * Add HTTP --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b2360a817..03505544e9 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ frontend(Frontend):::javascript loadgenerator([Load Generator]):::python paymentservice(Payment Service):::javascript productcatalogservice(ProductCatalog Service):::golang +quoteservice(Quote Service):::php recommendationservice(Recommendation Service):::python shippingservice(Shipping Service):::rust featureflagservice(Feature Flag Service):::erlang @@ -67,7 +68,7 @@ frontend --> productcatalogservice frontend --> checkoutservice frontend --> currencyservice frontend --> recommendationservice --> productcatalogservice -frontend --> shippingservice +frontend --> shippingservice -->|HTTP| quoteservice productcatalogservice --> |evalFlag| featureflagservice @@ -100,6 +101,7 @@ subgraph Service Legend javascriptsvc(JavaScript):::javascript rustsvc(Rust):::rust erlangsvc(Erlang/Elixir):::erlang + phpsvc(PHP):::php end classDef java fill:#b07219,color:white; From 36ffc292c139abf45a8f56c94454bf61f3b97cac Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Mon, 19 Sep 2022 11:03:38 -0400 Subject: [PATCH 3/3] Revert "Add traffic to adservice & recommendataion service (#368)" (#375) This reverts commit 7484ca82639074b080a6e4e71f58bb0fff455b7b. --- .gitignore | 1 - docker-compose.yml | 1 - src/loadgenerator/locustfile.py | 80 ++++++++++++------------------ src/loadgenerator/requirements.txt | 27 ++++------ 4 files changed, 41 insertions(+), 68 deletions(-) diff --git a/.gitignore b/.gitignore index 846a49a06e..3bba855e1c 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,3 @@ src/frontend/cypress/videos src/frontend/cypress/screenshots vendor/ composer.lock -.venv diff --git a/docker-compose.yml b/docker-compose.yml index 875f7e4808..2a58c72ff0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -319,7 +319,6 @@ services: - RECOMMENDATION_SERVICE_PORT - PRODUCT_CATALOG_SERVICE_ADDR - OTEL_PYTHON_LOG_CORRELATION=true - - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - OTEL_SERVICE_NAME=recommendationservice logging: *logging diff --git a/src/loadgenerator/locustfile.py b/src/loadgenerator/locustfile.py index 00769ff86f..1574ed3b04 100644 --- a/src/loadgenerator/locustfile.py +++ b/src/loadgenerator/locustfile.py @@ -20,7 +20,7 @@ from opentelemetry import context, baggage, trace from opentelemetry.sdk.trace import TracerProvider -from opentelemetry.sdk.trace.export import BatchSpanProcessor +from opentelemetry.sdk.trace.export import (BatchSpanProcessor) from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter from opentelemetry.instrumentation.requests import RequestsInstrumentor from opentelemetry.instrumentation.urllib3 import URLLib3Instrumentor @@ -42,7 +42,7 @@ "9SIQT8TOJO", "L9ECAV7KIM", "LS4PSXUNUM", - "OLJCESPC7Z", + "OLJCESPC7Z" ] people = [ @@ -53,15 +53,15 @@ "zipCode": 94043, "city": "Mountain View", "state": "CA", - "country": "United States", + "country": "United States" }, "userCurrency": "USD", "creditCard": { "creditCardNumber": "4432-8015-6152-0454", "creditCardExpirationMonth": 1, "creditCardExpirationYear": 2039, - "creditCardCvv": 672, - }, + "creditCardCvv": 672 + } }, { "email": "bill@example.com", @@ -70,15 +70,15 @@ "zipCode": 98052, "city": "Redmond", "state": "WA", - "country": "United States", + "country": "United States" }, "userCurrency": "USD", "creditCard": { "creditCardNumber": "4532-4211-7434-1278", "creditCardExpirationMonth": 2, "creditCardExpirationYear": 2039, - "creditCardCvv": 114, - }, + "creditCardCvv": 114 + } }, { "email": "steve@example.com", @@ -87,15 +87,15 @@ "zipCode": 95014, "city": "Cupertino", "state": "CA", - "country": "United States", + "country": "United States" }, "userCurrency": "USD", "creditCard": { "creditCardNumber": "4532-6178-2799-1951", "creditCardExpirationMonth": 3, "creditCardExpirationYear": 2039, - "creditCardCvv": 239, - }, + "creditCardCvv": 239 + } }, { "email": "mark@example.com", @@ -104,15 +104,15 @@ "zipCode": 94025, "city": "Menlo Park", "state": "CA", - "country": "United States", + "country": "United States" }, "userCurrency": "USD", "creditCard": { "creditCardNumber": "4539-1103-5661-7083", "creditCardExpirationMonth": 4, "creditCardExpirationYear": 2039, - "creditCardCvv": 784, - }, + "creditCardCvv": 784 + } }, { "email": "jeff@example.com", @@ -121,15 +121,15 @@ "zipCode": 98109, "city": "Seattle", "state": "WA", - "country": "United States", + "country": "United States" }, "userCurrency": "USD", "creditCard": { "creditCardNumber": "4916-0816-6217-7968", "creditCardExpirationMonth": 5, "creditCardExpirationYear": 2039, - "creditCardCvv": 397, - }, + "creditCardCvv": 397 + } }, { "email": "reed@example.com", @@ -138,15 +138,15 @@ "zipCode": 95032, "city": "Los Gatos", "state": "CA", - "country": "United States", + "country": "United States" }, "userCurrency": "USD", "creditCard": { "creditCardNumber": "4929-5431-0337-5647", "creditCardExpirationMonth": 6, "creditCardExpirationYear": 2039, - "creditCardCvv": 793, - }, + "creditCardCvv": 793 + } }, { "email": "tobias@example.com", @@ -155,15 +155,15 @@ "zipCode": 214, "city": "Ottawa", "state": "ON", - "country": "Canada", + "country": "Canada" }, "userCurrency": "CAD", "creditCard": { "creditCardNumber": "4763-1844-9699-8031", "creditCardExpirationMonth": 7, "creditCardExpirationYear": 2039, - "creditCardCvv": 488, - }, + "creditCardCvv": 488 + } }, { "email": "jack@example.com", @@ -172,15 +172,15 @@ "zipCode": 94103, "city": "San Francisco", "state": "CA", - "country": "United States", + "country": "United States" }, "userCurrency": "USD", "creditCard": { "creditCardNumber": "4929-6495-8333-3657", "creditCardExpirationMonth": 8, "creditCardExpirationYear": 2039, - "creditCardCvv": 159, - }, + "creditCardCvv": 159 + } }, { "email": "moore@example.com", @@ -189,16 +189,16 @@ "zipCode": 95054, "city": "Santa Clara", "state": "CA", - "country": "United States", + "country": "United States" }, "userCurrency": "USD", "creditCard": { "creditCardNumber": "4485-4803-8707-3547", "creditCardExpirationMonth": 9, "creditCardExpirationYear": 2039, - "creditCardCvv": 682, - }, - }, + "creditCardCvv": 682 + } + } ] @@ -213,22 +213,6 @@ def index(self): def browse_product(self): self.client.get("/api/products/" + random.choice(products)) - @task(3) - def get_recommendations(self): - user = str(uuid.uuid1()) - params = { - "productIds": [random.choice(products)], - "sessionId": user, - } - self.client.get("/api/recommendations/", params=params) - - @task(3) - def get_ads(self): - params = { - "productIds": [random.choice(products)], - } - self.client.get("/api/data/", params=params) - @task(3) def view_cart(self): self.client.get("/api/cart") @@ -242,9 +226,9 @@ def add_to_cart(self, user=""): cart_item = { "item": { "productId": product, - "quantity": random.choice([1, 2, 3, 4, 5, 10]), + "quantity": random.choice([1, 2, 3, 4, 5, 10]) }, - "userId": user, + "userId": user } self.client.post("/api/cart", json=cart_item) diff --git a/src/loadgenerator/requirements.txt b/src/loadgenerator/requirements.txt index a43c77a88d..2842d688a1 100644 --- a/src/loadgenerator/requirements.txt +++ b/src/loadgenerator/requirements.txt @@ -1,18 +1,9 @@ -ansible==6.3.0 -ansible-core==2.13.3 -black==22.8.0 -cffi==1.15.1 -click==8.1.3 -cryptography==37.0.4 -Jinja2==3.1.2 -MarkupSafe==2.1.1 -mypy-extensions==0.4.3 -packaging==21.3 -pathspec==0.10.1 -platformdirs==2.5.2 -pycparser==2.21 -pyparsing==3.0.9 -PyYAML==6.0 -resolvelib==0.8.1 -tomli==2.0.1 -typing_extensions==4.3.0 +locust==2.6.1 +opentelemetry-api==1.9.1 +opentelemetry-exporter-otlp-proto-grpc==1.9.1 +opentelemetry-instrumentation==0.28b1 +opentelemetry-instrumentation-requests==0.28b1 +opentelemetry-instrumentation-urllib3==0.28b1 +opentelemetry-sdk==1.9.1 +requests==2.27.1 +urllib3==1.26.8 \ No newline at end of file