You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
In the [https://github.com/awslabs/eb-java-scorekeep/tree/xray-ecs](https://github.com/awslabs/eb-java-scorekeep/tree/xray-ecs) branch, the Scorekeep sample application shows how to instrument an application running in Amazon Elastic Container Service \(Amazon ECS\)\. The branch provides scripts and configuration files for creating, uploading, and running Docker images in a Multicontainer Docker environment in AWS Elastic Beanstalk\.
4
+
5
+
The project includes three Dockerfiles that define container images for the API, front end, and X\-Ray daemon components\.
6
+
7
+
+`/Dockerfile` – The Scorekeep API\.
8
+
9
+
+`/scorekeep-frontend/Dockerfile` – The Angular web app client, and the nginx proxy that routes incoming traffic\.
10
+
11
+
+`/xray-daemon/Dockerfile` – The X\-Ray daemon\.
12
+
13
+
The X\-Ray daemon Dockerfile creates an image based on Amazon Linux that runs the X\-Ray daemon\.
14
+
15
+
**Example Dockerfile – Amazon Linux**
16
+
17
+
```
18
+
FROM amazonlinux
19
+
RUN yum install -y unzip
20
+
RUN curl -o daemon.zip https://s3.dualstack.us-east-2.amazonaws.com/aws-xray-assets.us-east-2/xray-daemon/aws-xray-daemon-linux-2.x.zip
The makefile in the same directory defines commands for building the image, uploading it to Amazon ECR, and [running it locally](xray-daemon-local.md#xray-daemon-local-docker)\.
27
+
28
+
To run the containers on Amazon ECS, the branch includes a script to generate a `Dockerrun.aws.json` file, which you can deploy to a multicontainer Docker environment in Elastic Beanstalk\. The [template](https://github.com/awslabs/eb-java-scorekeep/tree/xray-ecs/task-definition/template/scorekeep-dockerrun.template) that the script uses shows how to write a task definition that configures [networking between the containers in Amazon ECS](xray-daemon-ecs.md)\.
29
+
30
+
**Note**
31
+
`Dockerrun.aws.json` is the Elastic Beanstalk version of an Amazon ECS task definition file\. If you don't want to use Elastic Beanstalk to create your Amazon ECS cluster, you can modify the `Dockerrun.aws.json` file to run on Amazon ECS directly by removing the `AWSEBDockerrunVersion` key from the file\.
32
+
33
+
See the [branch README](https://github.com/awslabs/eb-java-scorekeep/tree/xray-ecs) for instructions on how to deploy Scorekeep to Amazon ECS\.
Copy file name to clipboardExpand all lines: doc-source/xray-console-filters.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,12 +184,12 @@ Complex keywords let you find requests based on service name, edge name, or anno
184
184
185
185
+`edge(name) {filter}` – Connection between services *source* and *destination*\. Optional curly braces can contain a filter expression that applies to segments on this connection\.
186
186
187
-
+`annotation.key` – Value of annotation with field *key*\. The value of an annotation can be a boolean, number, or string, so you can use any of those type's comparison operators\.
187
+
+`annotation.key` – Value of annotation with field *key*\. The value of an annotation can be a boolean, number, or string, so you can use any of those type's comparison operators\. You cannot use this keyword in combination with the `service` or `edge` keywords\.
188
188
189
189
Use the service keyword to find traces for requests that hit a certain node on your service map\.
190
190
191
191
**Example Service filter**
192
-
Requests that included a call to "api\.example\.com" with a fault \(500 series error\)\.
192
+
Requests that included a call to `api.example.com` with a fault \(500 series error\)\.
193
193
194
194
```
195
195
service("api.example.com") { fault }
@@ -207,7 +207,7 @@ service() { fault }
207
207
The edge keyword applies a filter expression to a connection between two nodes\.
208
208
209
209
**Example Edge filter**
210
-
Request where the service "api\.example\.com" made a call to "backend\.example\.com" that failed with an error\.
210
+
Request where the service `api.example.com` made a call to `backend.example.com` that failed with an error\.
You can also use the `!` operator with service and edge keywords to exclude a service or edge from the results of another filter expression\.
217
217
218
218
**Example Service and request filter**
219
-
Request where the URL begins with "http://api\.example\.com/" and contains "/v2/" but does not reach a service named "api\.example\.com"\.
219
+
Request where the URL begins with `http://api.example.com/` and contains `/v2/` but does not reach a service named `api.example.com`\.
220
220
221
221
```
222
222
http.url BEGINSWITH "http://api.example.com/" AND http.url CONTAINS "/v2/" AND !service("api.example.com")
@@ -225,28 +225,28 @@ http.url BEGINSWITH "http://api.example.com/" AND http.url CONTAINS "/v2/" AND !
225
225
For annotations, use the comparison operators that correspond to the type of value\.
226
226
227
227
**Example Annotation with string value**
228
-
Requests that caused a fault anywhere on your service map\.
228
+
Requests with an annotation named `gameid` with string value `"817DL6VO"`\.
229
229
230
230
```
231
231
annotation.gameid = "817DL6VO"
232
232
```
233
233
234
234
**Example Annotation with number value**
235
-
Requests that caused a fault anywhere on your service map\.
235
+
Requests with annotation age with numerical value greater than 29\.
236
236
237
237
```
238
238
annotation.age > 29
239
239
```
240
240
241
241
## The ID Function<aname="console-filters-functions"></a>
242
242
243
-
When you provide a service name to the service\(\) or edge\(\) keywords, you get results for all nodes that have that name\. For more precise filtering, you can use the id\(\) function to specify a service type in addition to a name to distinguish between nodes with the same name\.
243
+
When you provide a service name to the `service` or `edge` keywords, you get results for all nodes that have that name\. For more precise filtering, you can use the `id` function to specify a service type in addition to a name to distinguish between nodes with the same name\.
244
244
245
245
```
246
246
id(name: "service-name", type:"service::type")
247
247
```
248
248
249
-
You can use the id\(\) function in place of a service name in service and edge filters\.
249
+
You can use the `id` function in place of a service name in service and edge filters\.
Copy file name to clipboardExpand all lines: doc-source/xray-daemon-beanstalk.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,17 @@
1
1
# Running the X\-Ray Daemon on AWS Elastic Beanstalk<aname="xray-daemon-beanstalk"></a>
2
2
3
-
You can run the X\-Ray daemon on your Elastic Beanstalk environment's EC2 instances to relay trace data from your application to AWS X\-Ray\.
3
+
To relay trace data from your application to AWS X\-Ray, you can run the X\-Ray daemon on your Elastic Beanstalk environment's Amazon EC2 instances\. For a list of supported platforms, see [Configuring AWS X\-Ray Debugging](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-configuration-debugging.html) in the *AWS Elastic Beanstalk Developer Guide*\.
4
4
5
5
**Note**
6
-
For a list of supported platforms, see [Configuring AWS X\-Ray Debugging](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-configuration-debugging.html) in the AWS Elastic Beanstalk Developer Guide\.
7
-
8
6
The daemon uses your environment's instance profile for permissions\. For instructions about adding permissions to the Elastic Beanstalk instance profile, see [Giving the Daemon Permission to Send Data to X\-Ray](xray-daemon.md#xray-daemon-permissions)\.
9
7
10
-
AWS Elastic Beanstalk platforms provide a configuration option that you can set to run the daemon automatically\. You can enable the daemon in a configuration file in your source code or by checking an option in the Elastic Beanstalk console\.
8
+
Elastic Beanstalk platforms provide a configuration option that you can set to run the daemon automatically\. You can enable the daemon in a configuration file in your source code or by choosing an option in the Elastic Beanstalk console\. When you enable the configuration option, the daemon is installed on the instance and runs as a service\.
11
9
12
-
The daemon is installed on the instance and runs as a service when you enable the configuration option\.
10
+
The version included on Elastic Beanstalk platforms might not be the latest version\. See the [Supported Platforms topic](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html) to find out the version of the daemon that is available for your platform configuration\.
13
11
14
-
The version included on Elastic Beanstalk platforms may not be the latest version\. See the Elastic Beanstalk release notes to find out the version of the daemon that is available for the platform configuration that you use\.
12
+
Elastic Beanstalk does not provide the X\-Ray daemon on the Multicontainer Docker \(Amazon ECS\) platform\. The Scorekeep sample application shows how to use the X\-Ray daemon on Amazon ECS with Elastic Beanstalk\. See [Instrumenting Amazon ECS Applications](scorekeep-ecs.md) for details\.
15
13
16
-
## Using Elastic Beanstalk's X\-Ray Integration to Run the X\-Ray Daemon<aname="xray-daemon-beanstalk-option"></a>
14
+
## Using the Elastic Beanstalk X\-Ray Integration to Run the X\-Ray Daemon<aname="xray-daemon-beanstalk-option"></a>
17
15
18
16
Use the console to turn on X\-Ray integration, or configure it in your application source code with a configuration file\.
19
17
@@ -47,7 +45,7 @@ Elastic Beanstalk passes a configuration file to the daemon and outputs logs to
These examples also adds the daemon's log file to Elastic Beanstalk's tail logs task, to include it when you request logs with the console or Elastic Beanstalk Command Line Interface \(EB CLI\)\.
165
+
These examples also add the daemon's log file to the Elastic Beanstalk tail logs task, so that it's included when you request logs with the console or Elastic Beanstalk Command Line Interface \(EB CLI\)\.
Copy file name to clipboardExpand all lines: doc-source/xray-daemon-configuration.md
+18-3Lines changed: 18 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,22 @@
1
1
# Configuring the AWS X\-Ray Daemon<aname="xray-daemon-configuration"></a>
2
2
3
-
You can use command line options or a configuration file to customize the X\-Ray daemon's behavior\.
3
+
You can use command line options or a configuration file to customize the X\-Ray daemon's behavior\. Most options are available using both methods, but some are only available in configuration files and some only at the command line\.
4
+
5
+
To get started, the only option that you need to know is `-n` or `--region`, which you use to set the region that the daemon uses to send trace data to X\-Ray\.
6
+
7
+
```
8
+
~/xray-daemon$ ./xray -n us-east-2
9
+
```
10
+
11
+
If you are running the daemon locally, that is, not on Amazon EC2, you can add the `-o` option to skip checking for instance profile credentials so the daemon will become ready more quickly\.
12
+
13
+
```
14
+
~/xray-daemon$ ./xray -o -n us-east-2
15
+
```
16
+
17
+
The rest of the command line options let you configure logging, listen on a different port, limit the amount of memory that the daemon can use, or assume a role to send trace data to a different account\.
18
+
19
+
You can pass a configuration file to the daemon to access advanced configuration options and do things like limit the number of concurrent calls to X\-Ray, disable log rotation, and send traffic to a proxy\.
4
20
5
21
6
22
+[Using Command Line Options](#xray-daemon-configuration-commandline)
@@ -106,9 +122,8 @@ You can also use a YAML format file to configure the daemon\. Pass the configura
106
122
107
123
+`Version` – Daemon configuration file format version\.
108
124
109
-
The following configuration file changes the daemon's listening port to 3000, turns off checks for instance metadata, sets a role to use for uploading segments, and changes region and logging options\.
110
-
111
125
**Example xray\-daemon\.yaml**
126
+
This configuration file changes the daemon's listening port to 3000, turns off checks for instance metadata, sets a role to use for uploading segments, and changes region and logging options\.
0 commit comments