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
Copy file name to clipboardExpand all lines: examples/aws/README.md
+15-12Lines changed: 15 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ This is a getting started guide for the example applications found in the AWS co
11
11
12
12
Currently, the ability to instrument an application automatically does not exist, so manually instrumenting the apps was necessary. In both of the applications, creation of a tracer, generation of spans, propagation of contexts, and closing spans was implemented manually. Both of these applications are console applications that export trace data to the OTEL Collector which is then exported to AWS X-Ray.
13
13
14
-
### Sample App 1
14
+
### Aws Client App
15
15
16
16
The first sample app in its implementation is creation of a span, then a child span, which is then populated in an HTTP header that makes a request to either aws.amazon.com (http://aws.amazon.com/) or the AWS SDK. The application will prompt you for input on which action you would like to take, and subsequently prints out the trace ID.
17
17
@@ -90,39 +90,42 @@ At this point all necessary items have been installed in your system and you are
90
90
91
91
### Run Collector
92
92
93
-
Open a new terminal window and navigate into the aws-otel-collector folder.
94
-
95
93
Run the following command. Make sure to replace `YOUR_ACCESS_KEY_HERE` and `YOUR_SECRET_ACCESS_KEY_HERE` with your own specific keys.
96
94
97
95
```console
98
96
docker run --rm -p 4317:4317 -p 55681:55681 -p 8889:8888 \
In another terminal window, navigate to the opentelemetry-php-contrib folder.
108
106
109
-
Run the following command for Sample App 1:
107
+
To run `AwsClientApp`, navigate to `examples/aws/AwsClientApp`, then install required dependencies:
108
+
109
+
```
110
+
composer install
111
+
```
112
+
113
+
And run the following command:
110
114
111
-
`php examples/aws/SampleApp1/SampleApp1.php`
115
+
`php bin/app`
112
116
113
117
The output for this app should look similar to the following:
114
118
115
119
```console
116
-
Starting Sample App
117
-
Which call would you like to make?
120
+
Starting Aws Client App
121
+
122
+
Which call would you like to make?
118
123
Type outgoing-http-call or aws-sdk-call
119
124
outgoing-http-call
120
-
Final trace ID: {"traceId":"1-6115648a-d40b50a270b3c1249bcf60c2"}
121
-
Sample App complete!
125
+
Final trace ID: {"traceId":"1-622fb9fb-1b2031fcde9ac72610b6a0b9"}
126
+
Aws Client App complete!
122
127
```
123
128
124
-
Currently the `aws-sdk-call` option is commented out. This is due to dependency conflicts between AWS and the PHP Library. If you would like to enable it, follow the instructions in the comments of the SampleApp1.php file.
0 commit comments