--- title: "2. Trace a Transaction" chapter: true weight: 12 --- ## Trace a Transaction 1. Begin with the Service Map. To open a service map, in the Sumo UI, click **+New**, and then **Service Map**. Filter for Application Name= the-coffee-bar-app ![Service Map](/images/lab-monitoring/lab2-appname.png) 2. In the Service map, you can see that **the-coffee-bar-app** shows anomalies in some of its micro services. ![Micro Service Anomalies](/images/lab-monitoring/lab2-anomalies-coffeesvc.png) 3. Mouse over one of the services that are showing anomalies, to see more details: ![Details](/images/lab-monitoring/lab2-anomalies-details.png) 4. Click on the service with the **anomaly**, this will open the **Entity Inspector**, where the latency and error metrics are listed. ![Entity Explorer](/images/lab-monitoring/lab2-entity-explorer.png) 5. Click **Open In**, and then select **Traces**. ![Traces](/images/lab-monitoring/lab2-traces.png) {{% notice note %}} Alternatively, you can near the top of the Sumo Logic UI, click **+New** > **Traces**. {{% /notice %}} The trace page opens for the service selected. The window will show a list of traces related to that service, displayed in a table format. Select the first trace on the table, alternatively you can filter the table by the number of error column ![Trace Details](/images/lab-monitoring/lab2-trace-details.png) Click the trace Duration Breakdown to open the trace view. ![Duration Breakdown](/images/lab-monitoring/lab2-duration-breakdown.png) 6. Filter by **Error Span Only**. ![Error Spans](/images/lab-monitoring/lab2-error-spans.png) 7. Click on the **/get_coffee** operation, to find out what happened to our coffee order. {{% notice note %}} If you have selected a different service the operation will also have a different name. For example, water service uses get_water. {{% /notice %}} ![Trace View](/images/lab-monitoring/lab2-trace-view.png) This will open the Detail Pane on the right of the screen, on the Summary Tab. You can see the span details of the transaction and related logs below the details. 8. Click the first Log search to open the logs related to the Span ID. ![Span ID](/images/lab-monitoring/lab2-spanid.png) 9. When you go through the logs entry, you will see the cause of the error. {{% notice note %}} If you have chosen another serve i.e the water service the error would have occurred due to insufficient water in the coffee machine. {{% /notice %}} ![Error Cause](/images/lab-monitoring/lab2-error-cause.png) 10. Inform the barista at the particular error so the problem can be rectified. **Optional:** Use the **SpanId** and open in the **Span Analytics** tab to search and look further into the metadata related to the span.