Example: bachelor of science

AWS X-Ray - Developer Guide - …

AWS X-RayDeveloper GuideAWS X-Ray Developer GuideAWS X-Ray : Developer GuideCopyright 2018 Amazon Web Services, Inc. and/or its affiliates. All rights 's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any mannerthat is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks notowned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored X-Ray Developer GuideTable of ContentsWhat Is AWS X-Ray ? .. 1 Use Cases.. 3 Supported Languages and Frameworks .. 4 Supported AWS Services .. 6 Code and Configuration Changes.. 6 Getting Started .. 8 Prerequisites.

AWS X-Ray Developer Guide What Is AWS X-Ray? AWS X-Ray is a service that collects data about requests that your application serves, and provides

Tags:

  Developer, Guide, Aws x ray developer guide

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of AWS X-Ray - Developer Guide - …

1 AWS X-RayDeveloper GuideAWS X-Ray Developer GuideAWS X-Ray : Developer GuideCopyright 2018 Amazon Web Services, Inc. and/or its affiliates. All rights 's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any mannerthat is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks notowned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored X-Ray Developer GuideTable of ContentsWhat Is AWS X-Ray ? .. 1 Use Cases.. 3 Supported Languages and Frameworks .. 4 Supported AWS Services .. 6 Code and Configuration Changes.. 6 Getting Started .. 8 Prerequisites.

2 9 Deploy to Elastic Beanstalk and Generate Trace Data .. 10 View the Service Map in the X-Ray Console .. 11 Configuration Amazon SNS Notifications .. 13 Explore the Sample Application .. 15 Clean Up.. 18 Next Steps .. 19 Concepts .. 20 Segments.. 20 Subsegments.. 21 Service Graph .. 23 Traces .. 24 Sampling.. 25 Tracing Header .. 25 Filter Expressions .. 25 Groups .. 26 Annotations and Metadata.. 26 Errors, Faults, and Exceptions .. 27X-Ray Console .. 28 Viewing the Service Map .. 28 Viewing Traces .. 32 Viewing Segment Details.. 34 Viewing Subsegment Details.. 36 Filter Expressions .. 38To use filter expressions with groups .. 39 Filter Expression Syntax .. 40 Boolean Keywords.

3 40 Number Keywords .. 41 String Keywords .. 41 Complex Keywords .. 42 The ID Function .. 43 Deep Linking.. 45 Traces .. 45 Filter Expressions .. 45 Time Range.. 46 Region .. 46 Combined.. 46 Histograms.. 47 Sampling.. 48 Sampling Rule Options.. 49 Sampling Rule Examples.. 50 Configuring Your Service to Use Sampling Rules .. 51 Viewing Sampling Results .. 51 Next Steps .. 51 Encryption .. 52X-Ray API .. 53 Tutorial .. 53 Prerequisites .. 53iiiAWS X-Ray Developer GuideGenerate Trace Data .. 54 Use the X-Ray API .. 54 Cleanup.. 56 Sending Data.. 56 Generating Trace IDs .. 58 Using PutTraceSegments .. 58 Sending Segment Documents to the X-Ray Daemon .. 59 Getting Data .. 60 Retrieving the Service Graph.

4 60 Retrieving the Service Graph by Group .. 64 Retrieving Traces .. 65 Configuration.. 68 Encryption Settings .. 68 Sampling Rules.. 69 Groups .. 72 Sampling.. 73 CloudTrail .. 75 AWS Config .. 76 Creating a Lambda Function Trigger .. 77 Creating a Custom AWS Config Rule for X-Ray .. 78 Example Results .. 78 Amazon SNS Notifications .. 79 Segment Documents.. 79 Segment Fields.. 80 Subsegments.. 81 HTTP Request Data .. 84 Annotations.. 86 Metadata.. 87 AWS Resource Data .. 88 Errors and Exceptions .. 89 SQL Queries .. 90 Permissions .. 92 IAM Managed Policies for X-Ray .. 92 Running Your Application Locally .. 93 Running Your Application in AWS .. 94 User Permissions for Encryption.

5 94 Sample Application.. 96 AWS SDK Clients .. 100 Custom Subsegments.. 100 Annotations and Metadata.. 101 HTTP Clients .. 102 SQL Clients .. 102 AWS Lambda Functions .. 104 Random Name.. 105 Worker .. 106 Amazon ECS .. 108 Startup Code .. 109 Scripts.. 110 Client.. 112 Worker Threads .. 115 Deep Linking.. 117X-Ray Daemon .. 118 Downloading the Daemon .. 118 Verifying the Daemon Archive's Signature .. 118 Running the Daemon.. 119 Giving the Daemon Permission to Send Data to X-Ray .. 120X-Ray Daemon Logs .. 120ivAWS X-Ray Developer GuideConfiguration.. 121 Using Command Line Options.. 121 Using a Configuration File.. 122 Run the Daemon Locally.. 123 Running the X-Ray Daemon on Linux.

6 123 Running the X-Ray Daemon in a Docker Container .. 123 Running the X-Ray Daemon on Windows .. 124 Running the X-Ray Daemon on OS X .. 125On Elastic Beanstalk.. 125 Using the Elastic Beanstalk X-Ray Integration to Run the X-Ray Daemon .. 126 Downloading and Running the X-Ray Daemon Manually (Advanced) .. 127On Amazon EC2 .. 128On Amazon ECS .. 129 Working with Java .. 132 Requirements .. 133 Dependency Management .. 133 Configuration.. 135 Service Plugins .. 135 Sampling Rules.. 137 Logging.. 139 Environment Variables .. 139 System Properties .. 140 Incoming Requests .. 140 Adding a Tracing Filter to your Application (Tomcat) .. 141 Adding a Tracing Filter to your Application (Spring) .. 141 Configuring a Segment Naming Strategy.

7 142 AWS SDK Clients .. 143 Outgoing HTTP Calls .. 144 SQL Queries .. 146 Custom Subsegments.. 147 Annotations and Metadata.. 149 Recording Annotations with the X-Ray SDK for Java .. 149 Recording Metadata with the X-Ray SDK for Java .. 150 Recording User IDs with the X-Ray SDK for Java .. 151 Multithreading .. 152 AOP with Spring .. 152 Configuring Spring.. 153 Annotating Your Code or Implementing an Interface .. 153 Activating X-Ray in Your Application .. 153 Example.. 153 Working with Go .. 155 Requirements .. 156 Reference Documentation .. 156 Configuration.. 156 Service Plugins .. 156 Sampling Rules.. 158 Logging.. 159 Environment Variables .. 159 Using Configure .. 160 Incoming Requests.

8 160 Configuring a Segment Naming Strategy.. 161 AWS SDK Clients .. 162 Outgoing HTTP Calls .. 163 SQL Queries .. 164 Custom Subsegments.. 164 Annotations and Metadata.. 165 Recording Annotations with the X-Ray SDK for Go .. 165vAWS X-Ray Developer GuideRecording Metadata with the X-Ray SDK for Go .. 165 Recording User IDs with the X-Ray SDK for Go .. 166 Working with .. 167 Requirements .. 168 Dependency Management .. 168 Configuration.. 169 Service Plugins .. 169 Sampling Rules.. 170 Logging.. 171X-Ray Daemon Address .. 171 Environment Variables .. 172 Incoming Requests .. 172 Tracing Incoming Requests with Express .. 173 Tracing Incoming Requests with Restify .. 173 Configuring a Segment Naming Strategy.

9 174 AWS SDK Clients .. 175 Outgoing HTTP Calls .. 176 SQL Queries .. 177 Custom Subsegments.. 177 Annotations and Metadata.. 179 Recording Annotations with the X-Ray SDK for .. 179 Recording Metadata with the X-Ray SDK for .. 180 Working with Python .. 181 Requirements .. 182 Dependency Management .. 182 Configuration.. 183 Service Plugins .. 183 Sampling Rules.. 184 Logging.. 185 Recorder Configuration in Code .. 186 Recorder Configuration with Django .. 186 Environment Variables .. 187 Incoming Requests .. 187 Adding the Middleware to Your Application (Django) .. 188 Adding the Middleware to Your Application (Flask) .. 189 Instrumenting Python Code Manually .. 189 Configuring a Segment Naming Strategy.

10 189 Patching Libraries .. 190 Tracing Context for Asynchronous Work .. 191 AWS SDK Clients .. 192 Outgoing HTTP Calls .. 193 Custom Subsegments.. 194 Annotations and Metadata.. 195 Recording Annotations with the X-Ray SDK for Python .. 195 Recording Metadata with the X-Ray SDK for Python .. 196 Recording User IDs with the X-Ray SDK for Python .. 197 Working with Ruby .. 198 Requirements .. 198 Configuration.. 199 Service Plugins .. 199 Sampling Rules.. 200 Logging.. 202 Recorder Configuration in Code .. 202 Recorder Configuration with Rails .. 203 Environment Variables .. 203 Incoming Requests .. 204 Using the Rails Middleware .. 204viAWS X-Ray Developer GuideInstrumenting Code Manually.. 205 Configuring a Segment Naming Strategy.