Class: ElasticAPM::Span::Context Private

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic_apm/span/context.rb,
lib/elastic_apm/span/context/db.rb,
lib/elastic_apm/span/context/http.rb,
lib/elastic_apm/span/context/message.rb,
lib/elastic_apm/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, Message

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(db: nil, destination: nil, http: nil, labels: {}, sync: nil, message: 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
41
42
43
44
45
46
# File 'lib/elastic_apm/span/context.rb', line 24

def initialize(
  db: nil,
  destination: nil,
  http: nil,
  labels: {},
  sync: nil,
  message: 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
  @message =
    case message
    when Message then message
    when Hash then Message.new(**message)
    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.



48
49
50
# File 'lib/elastic_apm/span/context.rb', line 48

def db
  @db
end

#destinationObject

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.



56
57
58
# File 'lib/elastic_apm/span/context.rb', line 56

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.



48
49
50
# File 'lib/elastic_apm/span/context.rb', line 48

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.



48
49
50
# File 'lib/elastic_apm/span/context.rb', line 48

def labels
  @labels
end

#messageObject (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.



48
49
50
# File 'lib/elastic_apm/span/context.rb', line 48

def message
  @message
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.



48
49
50
# File 'lib/elastic_apm/span/context.rb', line 48

def sync
  @sync
end