Order service problem

Order service problem

Now we are going to set the order service version that will cause failures on the all requests.

To automate the version change, a unix script is provided that will do the following:

  • Call the order/setversion URL set the order-service version
  • Send a Dynatrace CUSTOM_DEPLOYMENT event indicating the change

After a minute or so, you should expect to see exceptions for all order related requests.

image

1. Enable the problem pattern

You will use the AWS Cloudshell to set the order service to version 3.

The argument for this depends on whether you do this on the Docker or the Kubernetes setup.

Option 1 - For Docker on the EC2 instance, run this command.

cd ~/aws-modernization-dt-orders-setup/learner-scripts/
./set-version.sh order 3

Option 2 - For Kubernetes setup, run this command.

cd ~/aws-modernization-dt-orders-setup/learner-scripts/
./set-version.sh k8-order 3

Ensure there are numerical values at the end for Response Data: storedEventIds like:

Response Data
{"storedEventIds":[8663164135574257870,-5988376401319068441],"storedIds":["8663164135574257870_1628095127627","-5988376401319068441_1628095127627"],"storedCorrelationIds":[]}

2. View app in browser

The event has the URL back to the sample application, so just click that if you don’t have the sample app up already. You should see version 3 for the order app now too.

image

3. Review problem in Dynatrace

The problem may take a minute to show up, but this is what the problem will look like once it does. Also, you may see two problems that eventually get merged into one as Dynatrace is performing the problem analysis.

  1. Problem card windows and impact summary
  2. Root cause
  3. Deployment event as additional context

image

4. Analyze problem

Referring to #4 in the picture above, click on the Analyze failure rate degradation button.

Right away we can see that there were exceptions in the code and the details button can be clicked to see the code stack trace.

image

5. Analyze problem impact

From the breadcrumb menu, click on the order to open the service page.

image

On this page, notice the failure rate.

image

Then click on the failure rate box to open the service details page. You can see exactly when the problem started.

image

6. Disable the problem pattern

From the from the Services host shell, run these commands to set the version back to version 1

The argument for this depends on whether you do this on the Docker or the Kubernetes setup.

Option 1 - For Docker on the EC2 instance, run this command.

cd ~/aws-modernization-dt-orders-setup/learner-scripts/
./set-version.sh order 1

Option 2 - For Kubernetes setup, run this command.

cd ~/aws-modernization-dt-orders-setup/learner-scripts/
./set-version.sh k8-order 1

Dynatrace will automatically close the problem once it detects things are back to normal.