Class: Atatus::Span::Context Private

Inherits:
Object
  • Object
show all
Defined in:
lib/atatus/span/context.rb,
lib/atatus/span/context/db.rb,
lib/atatus/span/context/http.rb,
lib/atatus/span/context/destination.rb

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.

Defined Under Namespace

Classes: Db, Destination, Http

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(db: nil, destination: nil, http: nil, labels: {}, sync: nil) ⇒ Context

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 instance of Context.



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/atatus/span/context.rb', line 24

def initialize(
  db: nil,
  destination: nil,
  http: nil,
  labels: {},
  sync: nil
)
  @sync = sync
  @db = db && Db.new(**db)
  @http = http && Http.new(**http)
  @destination =
    case destination
    when Destination then destination
    when Hash then Destination.new(**destination)
    end
  @labels = labels
end

Instance Attribute Details

#dbObject (readonly)

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.



42
43
44
# File 'lib/atatus/span/context.rb', line 42

def db
  @db
end

#destinationObject (readonly)

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.



42
43
44
# File 'lib/atatus/span/context.rb', line 42

def destination
  @destination
end

#httpObject (readonly)

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.



42
43
44
# File 'lib/atatus/span/context.rb', line 42

def http
  @http
end

#labelsObject (readonly)

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.



42
43
44
# File 'lib/atatus/span/context.rb', line 42

def labels
  @labels
end

#syncObject (readonly)

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.



42
43
44
# File 'lib/atatus/span/context.rb', line 42

def sync
  @sync
end