Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.
/ xray Public archive

Samples of using X-Ray with a variety of different languages.

License

Notifications You must be signed in to change notification settings

marjamis/xray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X-Ray

X-Ray configuration for testing/explanations.

This is still very much a work in-progress and some things will require updating/improving.

General

Most of the applications are runnable via the docker-compose.yml file for simplicity.

NOTE: The docker-compose.yml file requires an .env file for environment variables used throughout.

Usage

docker-compose up <supported_application>

Or:

export $(cat .env) && \
docker stack deploy --compose-file ./docker-compose <stack-name>

Examples

All applications do/will have:

  • Docker containerised
  • Traces through a front-end and a back-end application
  • Uses sampling based of a configuration file
  • Adds custom X-Ray annotations
  • Adds customs X-Ray metadata
  • Captures an synchronous call
  • Capture an asynchronous call

All applications do/will trace the following AWS Services:

  • ALB/ELB
  • API Gateway
  • DynamoDDB

X-Ray daemon

Note: This is a dependency for all applications started via docker-compose.yml

docker-compose up xray

Go

To run:

docker-compose up go
  • Uses custom Segments due to non-supported frameworks

Java

Already provided Java example: https://github.com/awslabs/eb-java-scorekeep/tree/xray

Node.js

To run:

docker-compose up nodejs
  • Uses express

Ruby

PENDING

Testing samples

Simple test against an endpoint with 30 concurrent users with a total of 1000 requests.

ab -k -c 30 -n 1000 <endpoint>/

If you're needing additional configurations/outputs the ab man page is the place to be.