Create X-Ray Group

Using a filter expression, you can define criteria by which to accept traces into a group.

You can call the group by name or by Amazon Resource Name (ARN) to generate its own service graph, trace summaries, and Amazon CloudWatch metrics. Once a group is created, incoming traces are checked against the group’s filter expression as they are stored in the X-Ray service. Metrics for the number of traces matching each criteria are published to CloudWatch every minute.

Updating a group’s filter expression does not change data that has already been recorded. The update applies only to subsequent traces. This can result in a merged graph of the new and old expressions. To avoid this, delete the current group and create a fresh one.

Create X-Ray group

  1. In the AWS Management Console on the Services menu, navigate to X-Ray.
  2. Click on the Default drop down and select Create group.

XRayGroup

  1. Name the group Higherlatency and enter the following filter expression. (This is a simple expression that filters for requests that exhibit a response time of greater than 3 seconds.)
responsetime > 3
  1. Click the Create Group button.
  2. Navigate back to the Service Map in the left navigation menu.
  3. Select Higherlatency from the default drop down.

You will see that the Service Map changes to only show the services and routes that exhibit a response time of greater than 3 seconds.

XRayGroup

When a Group is created, X-Ray also publishes new metrics.

  1. Go to AWS XRay namespace on CloudWatch Metrics.

  2. Click on Group Metricsin the All metrics tab towards the bottom of the screen.

  3. Check the box next to Higherlatency.

  4. Click on the Graphed metrics tab.

You will see a new metric called ApproximateTraceCount created for the group Higherlatency which you just created.

XRayGroup

This concludes the X-Ray module.