Method: OpenCensus::Trace.span_context

Defined in:
lib/opencensus/trace.rb

.span_contextSpanContext?

Returns the current thread-local SpanContext, which governs the behavior of the span creation class methods of OpenCensus::Trace. Returns ‘nil` if there is no current SpanContext.



72
73
74
# File 'lib/opencensus/trace.rb', line 72

def span_context
  OpenCensus::Context.get SPAN_CONTEXT_KEY
end