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: sample-apps/manual-instrumentation/ruby-on-rails/README.md
+35-1
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,40 @@ Sending metrics to Amazon CloudWatch is not yet validated. Check out the [OpenTe
30
30
31
31
## Application structure
32
32
33
-
Although this app was created with the `ruby new ruby-on-rails --minimal` command, it has been even further stripped down to focus on the OpenTelemetry changes needed to get tracing in this ruby on rails app.
33
+
This section describes the decisions made when designing the sample apps instrumented with ADOT Ruby.
34
+
35
+
### A minimal app
36
+
37
+
Although this app was created with the `rails new ruby-on-rails --minimal` command, it has been even further stripped down to focus on the OpenTelemetry changes needed to get tracing in this ruby on rails app.
34
38
35
39
The changes needed to trace with OpenTelemetry are found in [sample-apps/manual-instrumentation/ruby-on-rails/config/initializers/opentelemetry.rb](sample-apps/manual-instrumentation/ruby-on-rails/config/initializers/opentelemetry.rb).
40
+
41
+
### Running the app in `production` for tests
42
+
43
+
We build our application for a `production` environment because of https://github.com/aws-observability/aws-otel-ruby/pull/10.
44
+
45
+
However, to allow for a `production` environment, the rails app requires a "secret_base_key". Otherwise it will spam the log output with warnings which is really troublesome.
46
+
47
+
To solve this, we added **dummy credentials** which don't do anything. Because this is an example, **we directly commit the security credentials in the Dockerfile** but this is **NOT GOOD PRACTICE FOR REAL PRODUCTION ENVIRONMENTS**. We allow it to be like this because we want this demo example to work.
48
+
49
+
You can confirm the credentials work and view the encoded contents of by doing the following command:
50
+
51
+
```bash
52
+
$ cd sample-apps/manual-instrumentation/ruby-on-rails
0 commit comments