SlideShare a Scribd company logo
1 of 37
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
KD Singh, AWS Partner Solution Architect
AWS X-Ray
Debugging Applications at Scale
March 2017
What to expect from the session
 Overview
 Use Cases
 Concepts
 How AWS X-Ray works
 Getting Started
 Demo
 Pricing
 Docs and Resources
 Q&A
What is AWS X-Ray?
Debugging Applications
Debugging Applications
 A development environment
 Search through logs for clues to reproduce the issue
 Set breakpoints in code to stop execution, and inspect variables and call stack
 Add additional log statements as necessary and redeploy application
 Repeat until the issue is fixed
Traditional debugging involves:
Traditional process of debugging doesn’t scale well to production
applications or those built using a service-oriented, microservice, or
serverless architecture
It’s tedious, repetitive, and time consuming
 Simple to develop
 Simple to test and debug
 Simple to deploy
 Simple to scale
 Hard to iterate fast
 Hard to scale efficiently
 CI/CD time consuming and difficult
 Reliability challenges — a problem
with a single component can take
down the whole app
Monolithic vs. service-oriented applications
Applications traditionally developed using a
monolithic architecture
Benefits: Drawbacks:
Move to service oriented (microservices) architecture to overcome the
drawbacks of a monolithic application architecture
But microservices come with their own set of challenges
Challenges
Services such as AWS Lambda, Amazon EC2 Container Service, AWS Elastic
Beanstalk, AWS CloudFormation, etc. make it easier to deploy and manage
applications consisting of hundreds of services
Deploying and managing service-oriented applications can
be more work compared to monolithic applications
Still hard to debug application issues in production applications due to:
 Cross-service interactions
 Varying log formats across services
 Collecting, aggregating, and collating logs from services
 Identify performance bottlenecks and errors
 Pinpoint issues to specific service(s) in your application
 Identify impact of issues on users of the application
 Visualize the service call graph of your application
Solution
AWS X-Ray makes it easy to:
Use Cases
Visualize service call graph
Identify impact
Identify performance bottlenecks
Identify performance bottlenecks
Identify performance bottlenecks
Identify performance bottlenecks
Pinpoint issues
Pinpoint issues
Pinpoint issues
How does AWS X-Ray work?
X-Ray Concepts
Trace End-to-end data related a single request across services
Segments Portions of the trace that correspond to a single service
Sub-segments Remote call or local compute sections within a service
Annotations Business data that can be used to filter traces
Metadata Business data that can be added to the trace but not used for filtering traces
Errors Normalized error message and stack trace
Sampling Percentage of requests to your application to capture as traces
X-Ray Service
X-Ray SDK
Enables you to get started quickly without having to manually instrument your
application code to log metadata about requests
Available for Java, .NET, and Node.js
Adds filters to automatically captures metadata for calls to:
 AWS services using the AWS SDK
 Non-AWS services over HTTP and HTTPS
 Databases (MySQL, PostgreSQL, and Amazon DynamoDB)
 Queues (Amazon SQS)
X-Ray Daemon
Receives data from the SDK over UDP and acts as a local buffer. Data
is flushed to the backend every second or when the local buffer fills.
Available for Amazon Linux AMI, RHEL, Ubuntu, OS X, and Windows.
Can be run anywhere as long as AWS credentials are provided (e.g.: EC2,
ECS, on premise, developer machine, etc.)
X-Ray API
 X-Ray provides a set of APIs to enable you to send, filter, and
retrieve trace data
 You can send trace data directly to the service without having to
use our SDKs (i.e.: you can write your own SDKs for languages
not currently supported)
 Raw trace data is available using batch get APIs
 You can build your own data analysis applications on top of the
data collected by X-Ray
Segment Document
Minimal example
{
"name" : "example.com",
"id" : "70de5b6f19ff9a0a",
"start_time" : 1.478293361271E9,
"trace_id" : "1-581cf771-a006649127e371903a2de979",
"end_time" : 1.478293361449E9
}
Example showing an in-progress segment
{
"name" : "example.com",
"id" : "70de5b6f19ff9a0b",
"start_time" : 1.478293361271E9,
"trace_id" : "1-581cf771-a006649127e371903a2de979",
“in_progress”: true
}
Sampling Configuration
{
"rules": {
"move": {
"id": 1,
"service_name": "*",
"http_method": "*",
"url_path": "/api/move/*",
"fixed_target": 0,
"rate": 0.05
},
"base": {
"id": 2,
"service_name": "*",
"http_method": "*",
"url_path": "*",
"fixed_target": 1,
"rate": 0.1
}
}
}
This example defines two rules.
The first rule applies a five-percent sampling rate
with no minimum number of requests to trace to
requests with paths under /api/move
The second overrides the default sampling rule
with a rule that traces the first request each
second and 10 percent of additional requests.
Getting Started
Agent installation (Amazon EC2 Linux)
#!/bin/bash
curl https://s3.dualstack.us-east-1.amazonaws.com/aws-xray-assets.us-east-1/xray-daemon/aws-xray-
daemon-1.x.rpm -o /home/ec2-user/xray.rpm
yum install -y /home/ec2-user/xray.rpm
Agent Installation (Amazon EC2 Windows)
Agent installation (Amazon ECS)
Application instrumentation (Node.js)
//Add aws-xray-sdk package to package.json
var XRay = require('aws-xray-sdk');
var AWS = captureAWS(require('aws-sdk'));
…
XRay.config([XRay.plugins.EC2]);
XRay.captureHTTPs(http);
XRay.setDefaultName('myfrontend-dev');
…
app.use(XRay.express.openSegment());
app.get('/', function(req, res)…
app.get('/blog', function(req, res)…
app.use(XRay.express.closeSegment());
Pricing
X-Ray pricing
Free during the preview. After that:
Free tier
 The first 100,000 traces recorded per month are free
 The first 1,000,000 traces retrieved or scanned per month are free
Additional charges
 Beyond the free tier, traces recorded cost $5.00 per million per month
 Beyond the free tier, traces retrieved or scanned cost $0.50 per million per month
Demo
Available in preview
 Go to https://aws.amazon.com/xray to sign up for the preview.
 Documentation: http://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html
 .NET Sample: https://github.com/awslabs/aws-xray-dotnet-webapp
 Java Sample: https://github.com/awslabs/eb-java-scorekeep/tree/xray
 Node.js Sample: https://github.com/awslabs/eb-node-express-sample/tree/xray
The AWS X-Ray service is available in preview today.
Questions?
Thank you!

More Related Content

What's hot

금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
Amazon Web Services Korea
 
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeCI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
Amazon Web Services
 

What's hot (20)

Advanced Architectures with AWS Transit Gateway
Advanced Architectures with AWS Transit GatewayAdvanced Architectures with AWS Transit Gateway
Advanced Architectures with AWS Transit Gateway
 
AWS Overview in a Single Diagram
AWS Overview in a Single DiagramAWS Overview in a Single Diagram
AWS Overview in a Single Diagram
 
PCI DSSにおける認証認可 インフラ編
PCI DSSにおける認証認可 インフラ編PCI DSSにおける認証認可 インフラ編
PCI DSSにおける認証認可 インフラ編
 
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 
AWS セキュリティとコンプライアンス
AWS セキュリティとコンプライアンスAWS セキュリティとコンプライアンス
AWS セキュリティとコンプライアンス
 
Auto Scaling on AWS
Auto Scaling on AWSAuto Scaling on AWS
Auto Scaling on AWS
 
IAM Introduction
IAM IntroductionIAM Introduction
IAM Introduction
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
AWS IAM Introduction
AWS IAM IntroductionAWS IAM Introduction
AWS IAM Introduction
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
 
AWS Basics .pdf
AWS Basics .pdfAWS Basics .pdf
AWS Basics .pdf
 
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeCI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
 
AWSではじめるDNSSEC
AWSではじめるDNSSECAWSではじめるDNSSEC
AWSではじめるDNSSEC
 
Introduction To Amazon Web Services | AWS Tutorial for Beginners | AWS Traini...
Introduction To Amazon Web Services | AWS Tutorial for Beginners | AWS Traini...Introduction To Amazon Web Services | AWS Tutorial for Beginners | AWS Traini...
Introduction To Amazon Web Services | AWS Tutorial for Beginners | AWS Traini...
 
Aws+cloud+practitioner+exam+cram
Aws+cloud+practitioner+exam+cramAws+cloud+practitioner+exam+cram
Aws+cloud+practitioner+exam+cram
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
Amazon Kinesis Familyを活用したストリームデータ処理
Amazon Kinesis Familyを活用したストリームデータ処理Amazon Kinesis Familyを活用したストリームデータ処理
Amazon Kinesis Familyを活用したストリームデータ処理
 
AWS API Gateway
AWS API GatewayAWS API Gateway
AWS API Gateway
 
Aws ppt
Aws pptAws ppt
Aws ppt
 

Viewers also liked

Viewers also liked (20)

Incident Coordination Workshop
Incident Coordination WorkshopIncident Coordination Workshop
Incident Coordination Workshop
 
Amazon CloudWatch Logs and AWS Lambda
Amazon CloudWatch Logs and AWS LambdaAmazon CloudWatch Logs and AWS Lambda
Amazon CloudWatch Logs and AWS Lambda
 
How to Scale Your Architecture and DevOps Practices for Big Data Applications
How to Scale Your Architecture and DevOps Practices for Big Data ApplicationsHow to Scale Your Architecture and DevOps Practices for Big Data Applications
How to Scale Your Architecture and DevOps Practices for Big Data Applications
 
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech TalksDeep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
 
Building a Development Workflow for Serverless Applications - March 2017 AWS ...
Building a Development Workflow for Serverless Applications - March 2017 AWS ...Building a Development Workflow for Serverless Applications - March 2017 AWS ...
Building a Development Workflow for Serverless Applications - March 2017 AWS ...
 
Big Data Architectural Patterns and Best Practices on AWS
Big Data Architectural Patterns and Best Practices on AWSBig Data Architectural Patterns and Best Practices on AWS
Big Data Architectural Patterns and Best Practices on AWS
 
Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...
Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...
Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...
 
CloudFormation Best Practices
CloudFormation Best PracticesCloudFormation Best Practices
CloudFormation Best Practices
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef Automate
 
Deep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
Deep Dive on Amazon S3 - March 2017 AWS Online Tech TalksDeep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
Deep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
 
Best Practices for Managing Security Operations in AWS - March 2017 AWS Onlin...
Best Practices for Managing Security Operations in AWS - March 2017 AWS Onlin...Best Practices for Managing Security Operations in AWS - March 2017 AWS Onlin...
Best Practices for Managing Security Operations in AWS - March 2017 AWS Onlin...
 
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
 
Introduction to DevOps and the AWS Code Services
Introduction to DevOps and the AWS Code ServicesIntroduction to DevOps and the AWS Code Services
Introduction to DevOps and the AWS Code Services
 
Amazon EC2 Systems Manager for Hybrid Cloud Management at Scale
Amazon EC2 Systems Manager for Hybrid Cloud Management at ScaleAmazon EC2 Systems Manager for Hybrid Cloud Management at Scale
Amazon EC2 Systems Manager for Hybrid Cloud Management at Scale
 
Hands-on Labs: Getting Started with AWS - March 2017 AWS Online Tech Talks
Hands-on Labs: Getting Started with AWS  - March 2017 AWS Online Tech TalksHands-on Labs: Getting Started with AWS  - March 2017 AWS Online Tech Talks
Hands-on Labs: Getting Started with AWS - March 2017 AWS Online Tech Talks
 
Deep Dive on Amazon EBS Elastic Volumes - March 2017 AWS Online Tech Talks
Deep Dive on Amazon EBS Elastic Volumes - March 2017 AWS Online Tech TalksDeep Dive on Amazon EBS Elastic Volumes - March 2017 AWS Online Tech Talks
Deep Dive on Amazon EBS Elastic Volumes - March 2017 AWS Online Tech Talks
 
Infrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormationInfrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormation
 
Automate Software Deployments on EC2 with AWS CodeDeploy
Automate Software Deployments on EC2 with AWS CodeDeployAutomate Software Deployments on EC2 with AWS CodeDeploy
Automate Software Deployments on EC2 with AWS CodeDeploy
 
Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...
Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...
Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
 

Similar to Introduction to AWS X-Ray

Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
Amazon Web Services
 
RAHUL_Updated( (2)
RAHUL_Updated( (2)RAHUL_Updated( (2)
RAHUL_Updated( (2)
Rahul Singh
 
Cloud Migration: Azure acceleration with CAST Highlight
Cloud Migration: Azure acceleration with CAST HighlightCloud Migration: Azure acceleration with CAST Highlight
Cloud Migration: Azure acceleration with CAST Highlight
CAST
 

Similar to Introduction to AWS X-Ray (20)

Monitoring modern applications: Introduction to AWS xray
Monitoring modern applications: Introduction to AWS xrayMonitoring modern applications: Introduction to AWS xray
Monitoring modern applications: Introduction to AWS xray
 
NEW LAUNCH! Introduction to AWS X-Ray
NEW LAUNCH! Introduction to AWS X-RayNEW LAUNCH! Introduction to AWS X-Ray
NEW LAUNCH! Introduction to AWS X-Ray
 
Introduction to AWS X-Ray
Introduction to AWS X-RayIntroduction to AWS X-Ray
Introduction to AWS X-Ray
 
Raleigh DevDay 2017: Distributed serverless stack tracing and monitoring
Raleigh DevDay 2017: Distributed serverless stack tracing and monitoringRaleigh DevDay 2017: Distributed serverless stack tracing and monitoring
Raleigh DevDay 2017: Distributed serverless stack tracing and monitoring
 
Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Austin 2017
 
Introduction to AWS X-Ray
Introduction to AWS X-RayIntroduction to AWS X-Ray
Introduction to AWS X-Ray
 
Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017
 
Monitoring Modern Applications: Introduction to AWS X-Ray
Monitoring Modern Applications: Introduction to AWS X-RayMonitoring Modern Applications: Introduction to AWS X-Ray
Monitoring Modern Applications: Introduction to AWS X-Ray
 
Distributed Serverless Stack Tracing and Monitoring
Distributed Serverless Stack Tracing and MonitoringDistributed Serverless Stack Tracing and Monitoring
Distributed Serverless Stack Tracing and Monitoring
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
New Achitectures
New AchitecturesNew Achitectures
New Achitectures
 
Introducing Windows Azure
Introducing Windows Azure Introducing Windows Azure
Introducing Windows Azure
 
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
 
RAHUL_Updated( (2)
RAHUL_Updated( (2)RAHUL_Updated( (2)
RAHUL_Updated( (2)
 
(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...
(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...
(ENT210) Accelerating Business Innovation with DevOps on AWS | AWS re:Invent ...
 
Azure Cloud Application Development Workshop - UGIdotNET
Azure Cloud Application Development Workshop - UGIdotNETAzure Cloud Application Development Workshop - UGIdotNET
Azure Cloud Application Development Workshop - UGIdotNET
 
Cloud Migration: Azure acceleration with CAST Highlight
Cloud Migration: Azure acceleration with CAST HighlightCloud Migration: Azure acceleration with CAST Highlight
Cloud Migration: Azure acceleration with CAST Highlight
 
AWS Lambda support for AWS X-Ray
AWS Lambda support for AWS X-RayAWS Lambda support for AWS X-Ray
AWS Lambda support for AWS X-Ray
 
AWS Cloud Solutions Architects & Tech Enthusiasts
AWS Cloud Solutions Architects & Tech EnthusiastsAWS Cloud Solutions Architects & Tech Enthusiasts
AWS Cloud Solutions Architects & Tech Enthusiasts
 
Azure presentation nnug dec 2010
Azure presentation nnug  dec 2010Azure presentation nnug  dec 2010
Azure presentation nnug dec 2010
 

More from Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Recently uploaded

Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
Sheetaleventcompany
 

Recently uploaded (20)

George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptx
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 

Introduction to AWS X-Ray

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. KD Singh, AWS Partner Solution Architect AWS X-Ray Debugging Applications at Scale March 2017
  • 2. What to expect from the session  Overview  Use Cases  Concepts  How AWS X-Ray works  Getting Started  Demo  Pricing  Docs and Resources  Q&A
  • 3. What is AWS X-Ray?
  • 5. Debugging Applications  A development environment  Search through logs for clues to reproduce the issue  Set breakpoints in code to stop execution, and inspect variables and call stack  Add additional log statements as necessary and redeploy application  Repeat until the issue is fixed Traditional debugging involves: Traditional process of debugging doesn’t scale well to production applications or those built using a service-oriented, microservice, or serverless architecture It’s tedious, repetitive, and time consuming
  • 6.  Simple to develop  Simple to test and debug  Simple to deploy  Simple to scale  Hard to iterate fast  Hard to scale efficiently  CI/CD time consuming and difficult  Reliability challenges — a problem with a single component can take down the whole app Monolithic vs. service-oriented applications Applications traditionally developed using a monolithic architecture Benefits: Drawbacks: Move to service oriented (microservices) architecture to overcome the drawbacks of a monolithic application architecture But microservices come with their own set of challenges
  • 7. Challenges Services such as AWS Lambda, Amazon EC2 Container Service, AWS Elastic Beanstalk, AWS CloudFormation, etc. make it easier to deploy and manage applications consisting of hundreds of services Deploying and managing service-oriented applications can be more work compared to monolithic applications Still hard to debug application issues in production applications due to:  Cross-service interactions  Varying log formats across services  Collecting, aggregating, and collating logs from services
  • 8.  Identify performance bottlenecks and errors  Pinpoint issues to specific service(s) in your application  Identify impact of issues on users of the application  Visualize the service call graph of your application Solution AWS X-Ray makes it easy to:
  • 19. How does AWS X-Ray work?
  • 20. X-Ray Concepts Trace End-to-end data related a single request across services Segments Portions of the trace that correspond to a single service Sub-segments Remote call or local compute sections within a service Annotations Business data that can be used to filter traces Metadata Business data that can be added to the trace but not used for filtering traces Errors Normalized error message and stack trace Sampling Percentage of requests to your application to capture as traces
  • 22. X-Ray SDK Enables you to get started quickly without having to manually instrument your application code to log metadata about requests Available for Java, .NET, and Node.js Adds filters to automatically captures metadata for calls to:  AWS services using the AWS SDK  Non-AWS services over HTTP and HTTPS  Databases (MySQL, PostgreSQL, and Amazon DynamoDB)  Queues (Amazon SQS)
  • 23. X-Ray Daemon Receives data from the SDK over UDP and acts as a local buffer. Data is flushed to the backend every second or when the local buffer fills. Available for Amazon Linux AMI, RHEL, Ubuntu, OS X, and Windows. Can be run anywhere as long as AWS credentials are provided (e.g.: EC2, ECS, on premise, developer machine, etc.)
  • 24. X-Ray API  X-Ray provides a set of APIs to enable you to send, filter, and retrieve trace data  You can send trace data directly to the service without having to use our SDKs (i.e.: you can write your own SDKs for languages not currently supported)  Raw trace data is available using batch get APIs  You can build your own data analysis applications on top of the data collected by X-Ray
  • 25. Segment Document Minimal example { "name" : "example.com", "id" : "70de5b6f19ff9a0a", "start_time" : 1.478293361271E9, "trace_id" : "1-581cf771-a006649127e371903a2de979", "end_time" : 1.478293361449E9 } Example showing an in-progress segment { "name" : "example.com", "id" : "70de5b6f19ff9a0b", "start_time" : 1.478293361271E9, "trace_id" : "1-581cf771-a006649127e371903a2de979", “in_progress”: true }
  • 26. Sampling Configuration { "rules": { "move": { "id": 1, "service_name": "*", "http_method": "*", "url_path": "/api/move/*", "fixed_target": 0, "rate": 0.05 }, "base": { "id": 2, "service_name": "*", "http_method": "*", "url_path": "*", "fixed_target": 1, "rate": 0.1 } } } This example defines two rules. The first rule applies a five-percent sampling rate with no minimum number of requests to trace to requests with paths under /api/move The second overrides the default sampling rule with a rule that traces the first request each second and 10 percent of additional requests.
  • 28. Agent installation (Amazon EC2 Linux) #!/bin/bash curl https://s3.dualstack.us-east-1.amazonaws.com/aws-xray-assets.us-east-1/xray-daemon/aws-xray- daemon-1.x.rpm -o /home/ec2-user/xray.rpm yum install -y /home/ec2-user/xray.rpm
  • 31. Application instrumentation (Node.js) //Add aws-xray-sdk package to package.json var XRay = require('aws-xray-sdk'); var AWS = captureAWS(require('aws-sdk')); … XRay.config([XRay.plugins.EC2]); XRay.captureHTTPs(http); XRay.setDefaultName('myfrontend-dev'); … app.use(XRay.express.openSegment()); app.get('/', function(req, res)… app.get('/blog', function(req, res)… app.use(XRay.express.closeSegment());
  • 33. X-Ray pricing Free during the preview. After that: Free tier  The first 100,000 traces recorded per month are free  The first 1,000,000 traces retrieved or scanned per month are free Additional charges  Beyond the free tier, traces recorded cost $5.00 per million per month  Beyond the free tier, traces retrieved or scanned cost $0.50 per million per month
  • 34. Demo
  • 35. Available in preview  Go to https://aws.amazon.com/xray to sign up for the preview.  Documentation: http://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html  .NET Sample: https://github.com/awslabs/aws-xray-dotnet-webapp  Java Sample: https://github.com/awslabs/eb-java-scorekeep/tree/xray  Node.js Sample: https://github.com/awslabs/eb-node-express-sample/tree/xray The AWS X-Ray service is available in preview today.

Editor's Notes

  1. Debugging - X-Ray helps you locate the sources of bugs by aggregating errors, faults, and exceptions. Powerful search capabilities help you pinpoint issues. Tracing - X-Ray collects timing and response data needed to identify high-latency services, bottlenecks, and throttling in a microservices architecture. Service Map - X-Ray creates a map of services used by your application to provide you with a view of connections among clients, front-end service, and downstream services. not really an APM tool, developer tool. distributed tracing. no monitoring or alarms. apm provides that. for us it is cloudwatch. apm just need agents installed. for us sdk needs to be use to instrument code to collect trace data. We built X-Ray because customers said using opensource tools like zipkin difficult to maintain backend. besides ec2 where agents can be installed they want more access to performance info and impact by managed services like lambda, elb, dynamodb, sns etc. new relic agents can't be installed there. we plan to add x-ray support for all services in coming months. cost effective for customers and partners to use. we expose all collected data. plan to add for php, ruby, go and python before end of the year. using apis they can use any frameworks right now.
  2. sampling optional. control cost, better signal to noise ratio. if front end has billion request and backend 10, then overwhelmed frontend. you can choose 10% front end and 100% backend.
  3. Red: server side errors Yellow: client side errors Purple: throttling in play (we can get that info about services)