Developer Guide

AWS X-Ray Sample Application

A sample application that shows the use of the SDK to instrument incoming HTTP calls, DynamoDB SDK clients, and HTTP clients is available on GitHub. The app, eb-java-scorekeep, uses AWS Elastic Beanstalk features to create DynamoDB tables, compile Java code on-instance, and run the X-Ray daemon without any additional configuration.

The sample is an instrumented version of the Scorekeep project on AWSLabs. It includes a front-end web app, the API that it calls, and the DynamoDB tables that it uses to store data. All of the components are hosted in an AWS Elastic Beanstalk environment for portability and ease of deployment.

The xray branch of the application shows the use of filters, plugins, instrumented AWS SDK clients, HTTPClient, Annotations, SQL queries, custom subsegments, and an instrumented AWS Lambda function.

The sample application shows basic instrumentation in these files:

For instructions on using the sample application with X-Ray, see the getting started tutorial. In addition to the basic use of the X-Ray SDK for Java discussed in the tutorial, the sample also shows how to use the following features.