Context Propagation

Distributed Tracing tracks the progression of a single Request, called a Trace, as it is handled by Services that make up an Application. A Distributed Trace transverses process, network and security boundaries. glossary

This requires context propagation, a mechanism where identifiers for a trace are sent to remote processes.

ℹ The OpenTelemetry Ruby SDK will take care of context propagation as long as your service is leveraging auto-instrumented libraries. Please refer to the README for more details.

In order to propagate trace context over the wire, a propagator must be registered with the OpenTelemetry SDK. The W3 TraceContext and Baggage propagators are configured by default. Operators may override this value by setting OTEL_PROPAGATORS environment variable to a comma separated list of propagators. For example, to add B3 propagation, set OTEL_PROPAGATORS to the complete list of propagation formats you wish to support:

export OTEL_PROPAGATORS=tracecontext,baggage,b3

Propagators other than tracecontext and baggage must be added as gem dependencies to your Gemfile, e.g.:

gem 'opentelemetry-propagator-b3'