aws-samples/aws-xray-scatter-sample

Name: aws-xray-scatter-sample

Owner: AWS Samples

Description: Sample providing showcasing long-term trends for AWS X-Ray users

Created: 2017-11-21 00:01:57.0

Updated: 2018-01-17 14:34:05.0

Pushed: 2017-11-30 17:24:01.0

Homepage: null

Size: 220

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

AWS X-Ray Sample App

This sample application uses the AWS X-Ray API's to generate a 3-hour or 7-day latency heatmap and health graph for individual services that make up your application. It uses Vega-Lite to generate the heatmap and health graph. The sample can be run locally or deployed to AWS Elastic Beanstalk.

License

This sample application is licensed under the Apache 2.0 License.

Requirements

Ruby 2.3 or later with bundler.

Features
Latency Heatmap

A heatmap showing the latency over time (3-hour or 7-days) for a particular service or edge. You can click+drag to select an area to search for traces that meet that criteria.

Health Graph

A service health graph that shows how the health of a particular service or edge has changed over time. You can click+drag to select an area to search for traces that meet that criteria.

Linking to X-Ray console

Listing of traces that meet the criteria for the selected areas in the heatmap or the health graph. Enables you to easily bring up the individual traces in the X-Ray console.

Getting Started
Local
ndle install --path vendor/bundle
ndle exec rackup

Open your browser to http://localhost:9292/

Note: The sample app default to the us-east-1 region. If your X-Ray data is in another region, click on the … on the top right to bring up the region selection panel and select a different region.

AWS Elastic Beanstalk

Note: Deploying this app to Elastic Beanstalk using the below instructions will enable anyone with the URL for your Elastic Beanstalk environment to view the app. You can restrict access by running the app in a VPC or updating the load balancer security gruop to only allow access from trusted IP addresses.

You can get started using the following steps:

  1. Install the AWS Elastic Beanstalk Command Line Interface (CLI).
  2. Create an IAM Instance Profile named aws-elasticbeanstalk-sample-role with the policy in iam_policy.json. For more information on how to create an IAM Instance Profile, see Create an IAM Instance Profile for Your Amazon EC2 Instances.
  3. Run eb init -r <region> -p "Ruby" to initialize the folder for use with the CLI. Replace <region> with a region identifier such as us-west-2 (see Regions and Endpoints for a full list of region identifiers). For interactive mode, run eb init then,
    1. Pick a region of your choice.
    2. Select the [ Create New Application ] option.
    3. Enter the application name of your choice.
    4. Answer yes to It appears you are using Node.js. Is this correct?.
    5. Choose whether you want SSH access to the Amazon EC2 instances.
      Note: If you choose to enable SSH and do not have an existing SSH key stored on AWS, the EB CLI requires ssh-keygen to be available on the path to generate SSH keys.
  4. Run eb create --instance_profile aws-elasticbeanstalk-sample-role to begin the creation of your environment.
    1. Enter the environment name of your choice.
    2. Enter the CNAME prefix you want to use for this environment.
  5. Once the environment creation process completes, run eb open to open the application in a browser.
  6. Run eb terminate --all to clean up.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.