TracesReleases

Releases

v0.18.1

v0.18.0

New Context Propagation Interfaces

Traces#trace_context and Traces.trace_context are insufficient for efficient inter-process tracing when using OpenTelemetry. That is because OpenTelemetry has it's own "Context" concept with arbitrary key-value storage (of which the current span is one such key/value pair). Unfortunately, OpenTelemetry requires those values to be propagated "inter-process" while ignores them for "intra-process" tracing.

Therefore, in order to propagate this context, we introduce 4 new methods:

The default implementation is built on top of Traces.trace_context, however these methods can be replaced by the backend. In that case, the context object is opaque, in other words it is library-specific, and you should not assume it is an instance of Traces::Context.

v0.17.0

v0.16.0

v0.14.0

Introduce Traces::Config to Expose prepare Hook

The traces gem uses aspect-oriented programming to wrap existing methods to emit traces. However, while there are some reasonable defaults for emitting traces, it can be useful to customize the behavior and level of detail. To that end, the traces gem now optionally loads a config/traces.rb which includes a prepare hook that can be used to load additional providers.

# config/traces.rb

def prepare
	require 'traces/provider/async'
	require 'traces/provider/async/http'
end

The prepare method is called immediately after the traces backend is loaded. You can require any provider you want in this file, or even add your own custom providers.