From c64debb50d1ed759d679fb231370020cba4a282b Mon Sep 17 00:00:00 2001 From: Reese Lee Date: Tue, 16 Jul 2024 16:38:42 -0700 Subject: [PATCH] Create product-catalog-failure.md --- .../demo-scenarios/product-catalog-failure.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 docs/demo-scenarios/product-catalog-failure.md diff --git a/docs/demo-scenarios/product-catalog-failure.md b/docs/demo-scenarios/product-catalog-failure.md new file mode 100644 index 0000000000..b7708a7e9b --- /dev/null +++ b/docs/demo-scenarios/product-catalog-failure.md @@ -0,0 +1,62 @@ +## Product Catalog service failure + +**Issue:** generates an error for `GetProduct` requests with the product ID: +OLJCESPC7Z. + +If you would like to follow along, navigate to src > flagd > demo.flagd.json, +and under `productCatalogFailure`, change the value for `defaultVariant` to `on`. +Save the file, then restart the app. + +Wait a few minutes for the load generator to generate new data; you will pretty +quickly see that the error rates for a couple services have increased. First, go +to the `productcatalogservice` entity in your New Relic account and click on `Errors +inbox`: + +demo-productcatalogservice-01 + +(In case you are wondering why the Error rate chart next to the Error count chart +appears empty, click on the `...` and select `View query`. You'll see that +this chart is querying for HTTP status code 500. Since this entity isn't +reporting any 500s, this chart is empty.) + +Select the error group `oteldemo.ProductCatalogService/GetProduct`, which will open up +the error group summary and confirm that the feature flag was enabled: + +demo-productcatalogservice02 + +(Note that there are no logs for this service at this time; per this [ +table](https://opentelemetry.io/docs/demo/telemetry-features/log-coverage/), logs have not yet been +added for `productcatalogservice`.) + +Scroll down to `Attributes`, and you can see the attribute `app.product.id` with +the value `OLJCESPC7Z` was captured: + +demo-productcatalogservice03 + +This in itself is not particularly interesting; head on over to the `checkoutservice` +entity and click on `Errors inbox`. You'll see an error group named +`oteldemo.CheckoutService/PlaceOrder`, with the message `failed to prepare order: +failed to get product #"OLJCESPC7Z"`: + +demo-checkoutservice01 + +Click on the blue icon under `Distributed Trace`: + +demo-checkoutservice02 + +You'll see a distributed trace that includes an entity map, showing you how the +error you enabled with the feature flag affected upstream services: + +demo-checkoutservice03 + +Click on the "Errors" dropdown menu and select the `checkoutservice` span named +`oteldemo.CheckoutService/PlaceOrder`: + +demo-checkoutservice04 + +On the right-hand panel, click on `View span events` to view more details about +the span event that was captured: + +demo-checkoutservice-05 + +demo-checkoutservice06