Commit 73d19ba
BAU: configure OpenTelemetry ID Generator
We need to use the XRay ID generator when using the XRay propagator, in
order to generate trace IDs in the correct format. As we're configuring
the propagator via the OTEL_PROPAGATORS environment variable, we can
gate the ID generator configuration behind the same variable to keep
things agnostic.
This can only be done via code, so we have to add this to the
OpenTelemetry SDK configuration in an initializer.
see: https://aws-otel.github.io/docs/getting-started/ruby-sdk/trace-manual-instr#instrumenting-an-application:~:text=Next%2C%20because%20the%20AWS%20X%2DRay%20ID%20Generator%20can%20only%20be%20configured%20through%20code%2C%20you%20cannot%20use%20an%20environment%20variable%20to%20select%20it.%20The%20ID%20Generator%20must%20be%20used%20at%20the%20time%20OpenTelemetry%20Ruby%20SDK%20is%20configured1 parent 53ba2aa commit 73d19ba
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
0 commit comments