Query X-Ray trace data

Query AWS X-Ray

  1. Select AWS services from the AWS logo on the left navigation menu.

This will take you to a screen that shows all the AWS data sources available for you to choose from as pictured below.

Data sources

  1. Select X-Ray from the Service dropdown.
  2. Select the AWS Region where the PetAdoptions application is deployed to.

XRay data source

  1. Create a new Dashboard. (If you have already created a Dashboard, create a new Grafana Panel.)

  2. Select X-Ray as the data source and paste the following X-Ray filter expression in the query text box.

This filter expression will show only the traces between the PetSite and the payforadoption services.

edge("PetSite", "payforadoption")

Traces

  1. Copy and paste the following Filter expression into the Query text box.
Annotation.PetType = "bunny" OR Annotation.PetType = "puppy"

You can also go to AWS X-Ray directly by simply clicking on the TraceID shown in the results.

Traces

  1. Paste the following expression to see all the traces between the services PetSite and payforadoption and that have annotation PetType=bunny.
edge("PetSite", "payforadoption") AND Annotation.PetType="bunny"
  1. Change the visualization to Stat to see the graph as shown below.

PetType Bunny

  1. Click on one of the Trace IDs to see the segment graph as similar to the one below.

Segment graph

This concludes the Amazon Managed Service for Grafana module.