From 9121e4bb6e128fc50c2180f9920fae4672cef756 Mon Sep 17 00:00:00 2001 From: Daniel Dias Date: Thu, 12 Sep 2024 14:17:49 -0300 Subject: [PATCH 1/3] chore: update otel demo examples --- .../otel-demo/01-see-ads.yaml | 2 -- .../otel-demo/02-get-product-recommendation.yaml | 2 -- .../otel-demo/03-browse-product.yaml | 2 -- .../otel-demo/04-add-product-to-cart.yaml | 6 ++---- .../otel-demo/05-view-cart.yaml | 6 ++---- .../otel-demo/06-checking-out-cart.yaml | 15 +-------------- .../otel-demo/_testsuite.yaml | 4 +--- 7 files changed, 6 insertions(+), 31 deletions(-) diff --git a/testing/synthetic-monitoring/otel-demo/01-see-ads.yaml b/testing/synthetic-monitoring/otel-demo/01-see-ads.yaml index 0f61a02989..16034ecd53 100644 --- a/testing/synthetic-monitoring/otel-demo/01-see-ads.yaml +++ b/testing/synthetic-monitoring/otel-demo/01-see-ads.yaml @@ -1,5 +1,3 @@ -# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service - type: Test spec: id: frontend-see-adds diff --git a/testing/synthetic-monitoring/otel-demo/02-get-product-recommendation.yaml b/testing/synthetic-monitoring/otel-demo/02-get-product-recommendation.yaml index 62abcfcc8c..62111c80bc 100644 --- a/testing/synthetic-monitoring/otel-demo/02-get-product-recommendation.yaml +++ b/testing/synthetic-monitoring/otel-demo/02-get-product-recommendation.yaml @@ -1,5 +1,3 @@ -# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service - type: Test spec: id: frontend-get-recommendation diff --git a/testing/synthetic-monitoring/otel-demo/03-browse-product.yaml b/testing/synthetic-monitoring/otel-demo/03-browse-product.yaml index 6c7a7c2686..58af9ec0a1 100644 --- a/testing/synthetic-monitoring/otel-demo/03-browse-product.yaml +++ b/testing/synthetic-monitoring/otel-demo/03-browse-product.yaml @@ -1,5 +1,3 @@ -# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service - type: Test spec: id: frontend-browse-product diff --git a/testing/synthetic-monitoring/otel-demo/04-add-product-to-cart.yaml b/testing/synthetic-monitoring/otel-demo/04-add-product-to-cart.yaml index 87f72cc43f..f5cb36fc95 100644 --- a/testing/synthetic-monitoring/otel-demo/04-add-product-to-cart.yaml +++ b/testing/synthetic-monitoring/otel-demo/04-add-product-to-cart.yaml @@ -1,5 +1,3 @@ -# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service - type: Test spec: id: frontend-add-product @@ -27,9 +25,9 @@ spec: assertions: - attr:tracetest.response.status = 200 - name: It added an item correctly into the shopping cart - selector: span[name="oteldemo.CartService/AddItem"] + selector: span[name="POST /oteldemo.CartService/AddItem"] assertions: - - attr:rpc.grpc.status_code = 0 + - attr:grpc.status_code = 0 - attr:app.product.id = "0PUK6V6EV0" - name: It set the cart item correctly on the database selector: span[tracetest.span.type="database" name="HMSET" db.system="redis" db.redis.database_index="0"] diff --git a/testing/synthetic-monitoring/otel-demo/05-view-cart.yaml b/testing/synthetic-monitoring/otel-demo/05-view-cart.yaml index 3d5c3402ff..7568f31865 100644 --- a/testing/synthetic-monitoring/otel-demo/05-view-cart.yaml +++ b/testing/synthetic-monitoring/otel-demo/05-view-cart.yaml @@ -1,5 +1,3 @@ -# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service - type: Test spec: id: frontend-view-cart @@ -19,6 +17,6 @@ spec: assertions: - attr:tracetest.response.status = 200 - name: It retrieved the cart items correctly - selector: span[name="oteldemo.CartService/GetCart"] + selector: span[name="POST /oteldemo.CartService/GetCart"] assertions: - - attr:rpc.grpc.status_code = 0 + - attr:grpc.status_code = 0 diff --git a/testing/synthetic-monitoring/otel-demo/06-checking-out-cart.yaml b/testing/synthetic-monitoring/otel-demo/06-checking-out-cart.yaml index 2caad1fafd..174fdacbee 100644 --- a/testing/synthetic-monitoring/otel-demo/06-checking-out-cart.yaml +++ b/testing/synthetic-monitoring/otel-demo/06-checking-out-cart.yaml @@ -1,5 +1,3 @@ -# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service - type: Test spec: id: frontend-checkout-shopping-cart @@ -58,17 +56,6 @@ spec: - attr:rpc.grpc.status_code = 0 - attr:tracetest.selected_spans.count >= 1 - name: The order was sent to be processed asyncronously - selector: span[tracetest.span.type="messaging" name="orders publish" messaging.system="kafka" messaging.destination.name="orders" messaging.destination.kind="topic" messaging.operation="publish"] + selector: span[tracetest.span.type="messaging" name="orders publish" messaging.system="kafka" messaging.destination.name="orders" messaging.operation="publish"] assertions: - attr:messaging.destination.name = "orders" - # TODO: Accountability service is not working in our Demo env, we need to understand why - # - name: The order was sent to accountability - # # captures the span emitted by Kafka instrumentation for Go - # selector: span[tracetest.span.type="messaging" name="orders receive" messaging.system="kafka" messaging.destination.name="orders" messaging.destination.kind="topic" messaging.operation="receive"] - # assertions: - # - attr:name = "orders receive" - - name: The order was sent to fraud detection team - # captures the span emitted by Kafka instrumentation for Kotlin - selector: span[tracetest.span.type="messaging" name="orders process" messaging.system="kafka" messaging.operation="process"] - assertions: - - attr:name = "orders process" diff --git a/testing/synthetic-monitoring/otel-demo/_testsuite.yaml b/testing/synthetic-monitoring/otel-demo/_testsuite.yaml index 0e9a13f27a..50445bb097 100644 --- a/testing/synthetic-monitoring/otel-demo/_testsuite.yaml +++ b/testing/synthetic-monitoring/otel-demo/_testsuite.yaml @@ -1,9 +1,7 @@ -# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service - type: TestSuite spec: id: pokeshop-demo-test-suite - name: OTel Demo Synthetic tests + name: 'OTel Demo Synthetic tests' description: Run all Frontend tests enabled in sequence, simulating a process of a user purchasing products on Astronomy store steps: - ./01-see-ads.yaml From 26fe8991fce35fa6acb2f9b0a0ad5d757eb52d93 Mon Sep 17 00:00:00 2001 From: Daniel Dias Date: Thu, 12 Sep 2024 14:19:24 -0300 Subject: [PATCH 2/3] add header with ref to otel demo --- testing/synthetic-monitoring/otel-demo/01-see-ads.yaml | 2 ++ .../otel-demo/02-get-product-recommendation.yaml | 2 ++ testing/synthetic-monitoring/otel-demo/03-browse-product.yaml | 2 ++ .../synthetic-monitoring/otel-demo/04-add-product-to-cart.yaml | 2 ++ testing/synthetic-monitoring/otel-demo/05-view-cart.yaml | 2 ++ .../synthetic-monitoring/otel-demo/06-checking-out-cart.yaml | 2 ++ 6 files changed, 12 insertions(+) diff --git a/testing/synthetic-monitoring/otel-demo/01-see-ads.yaml b/testing/synthetic-monitoring/otel-demo/01-see-ads.yaml index 16034ecd53..0f61a02989 100644 --- a/testing/synthetic-monitoring/otel-demo/01-see-ads.yaml +++ b/testing/synthetic-monitoring/otel-demo/01-see-ads.yaml @@ -1,3 +1,5 @@ +# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service + type: Test spec: id: frontend-see-adds diff --git a/testing/synthetic-monitoring/otel-demo/02-get-product-recommendation.yaml b/testing/synthetic-monitoring/otel-demo/02-get-product-recommendation.yaml index 62111c80bc..62abcfcc8c 100644 --- a/testing/synthetic-monitoring/otel-demo/02-get-product-recommendation.yaml +++ b/testing/synthetic-monitoring/otel-demo/02-get-product-recommendation.yaml @@ -1,3 +1,5 @@ +# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service + type: Test spec: id: frontend-get-recommendation diff --git a/testing/synthetic-monitoring/otel-demo/03-browse-product.yaml b/testing/synthetic-monitoring/otel-demo/03-browse-product.yaml index 58af9ec0a1..6c7a7c2686 100644 --- a/testing/synthetic-monitoring/otel-demo/03-browse-product.yaml +++ b/testing/synthetic-monitoring/otel-demo/03-browse-product.yaml @@ -1,3 +1,5 @@ +# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service + type: Test spec: id: frontend-browse-product diff --git a/testing/synthetic-monitoring/otel-demo/04-add-product-to-cart.yaml b/testing/synthetic-monitoring/otel-demo/04-add-product-to-cart.yaml index f5cb36fc95..e484cc71f0 100644 --- a/testing/synthetic-monitoring/otel-demo/04-add-product-to-cart.yaml +++ b/testing/synthetic-monitoring/otel-demo/04-add-product-to-cart.yaml @@ -1,3 +1,5 @@ +# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service + type: Test spec: id: frontend-add-product diff --git a/testing/synthetic-monitoring/otel-demo/05-view-cart.yaml b/testing/synthetic-monitoring/otel-demo/05-view-cart.yaml index 7568f31865..714fc70ef8 100644 --- a/testing/synthetic-monitoring/otel-demo/05-view-cart.yaml +++ b/testing/synthetic-monitoring/otel-demo/05-view-cart.yaml @@ -1,3 +1,5 @@ +# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service + type: Test spec: id: frontend-view-cart diff --git a/testing/synthetic-monitoring/otel-demo/06-checking-out-cart.yaml b/testing/synthetic-monitoring/otel-demo/06-checking-out-cart.yaml index 174fdacbee..f927e4c221 100644 --- a/testing/synthetic-monitoring/otel-demo/06-checking-out-cart.yaml +++ b/testing/synthetic-monitoring/otel-demo/06-checking-out-cart.yaml @@ -1,3 +1,5 @@ +# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service + type: Test spec: id: frontend-checkout-shopping-cart From 3a4a72b266467f963b1f19a6ed86a3f4f478267f Mon Sep 17 00:00:00 2001 From: Daniel Dias Date: Thu, 12 Sep 2024 14:21:01 -0300 Subject: [PATCH 3/3] update header for test suite --- testing/synthetic-monitoring/otel-demo/_testsuite.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/synthetic-monitoring/otel-demo/_testsuite.yaml b/testing/synthetic-monitoring/otel-demo/_testsuite.yaml index 50445bb097..5ca26e810c 100644 --- a/testing/synthetic-monitoring/otel-demo/_testsuite.yaml +++ b/testing/synthetic-monitoring/otel-demo/_testsuite.yaml @@ -1,3 +1,5 @@ +# test suite based on https://github.com/open-telemetry/opentelemetry-demo/tree/main/test/tracetesting/frontend-service + type: TestSuite spec: id: pokeshop-demo-test-suite