Class: OpenTelemetry::Internal::ProxyTracer Private

Inherits:
Trace::Tracer show all
Defined in:
lib/opentelemetry/internal/proxy_tracer.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

ProxyTracer is an implementation of Trace::Tracer. It is returned from the ProxyTracerProvider until a delegate tracer provider is installed. After the delegate tracer provider is installed, the ProxyTracer will delegate to the corresponding "real" tracer.

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Trace::Tracer

#in_span

Constructor Details

#initializeProxyTracer

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new OpenTelemetry::Internal::ProxyTracer instance.

API:

  • private



21
22
23
# File 'lib/opentelemetry/internal/proxy_tracer.rb', line 21

def initialize
  @delegate = nil
end

Instance Attribute Details

#delegate=(value) ⇒ Object (writeonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



16
17
18
# File 'lib/opentelemetry/internal/proxy_tracer.rb', line 16

def delegate=(value)
  @delegate = value
end

Instance Method Details

#start_root_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



25
26
27
28
29
# File 'lib/opentelemetry/internal/proxy_tracer.rb', line 25

def start_root_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
  return @delegate.start_root_span(name, attributes: attributes, links: links, start_timestamp: start_timestamp, kind: kind) unless @delegate.nil?

  super
end

#start_span(name, with_parent: nil, attributes: nil, links: nil, start_timestamp: nil, kind: nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



31
32
33
34
35
# File 'lib/opentelemetry/internal/proxy_tracer.rb', line 31

def start_span(name, with_parent: nil, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
  return @delegate.start_span(name, with_parent: with_parent, attributes: attributes, links: links, start_timestamp: start_timestamp, kind: kind) unless @delegate.nil?

  super
end