class XRay::Metadata
Metadata
are key-value pairs with values of any type, including objects and lists, but that are not indexed. Use metadata to record data you want to store in the trace but don't need to use for searching traces.
Public Class Methods
new(entity)
click to toggle source
# File lib/aws-xray-sdk/model/metadata.rb, line 9 def initialize(entity) @data = {} @entity = entity end
Public Instance Methods
sub_meta(namespace)
click to toggle source
# File lib/aws-xray-sdk/model/metadata.rb, line 14 def sub_meta(namespace) @data[namespace] = SubMeta.new(@entity) unless @data[namespace] @data[namespace] end
to_h()
click to toggle source
# File lib/aws-xray-sdk/model/metadata.rb, line 19 def to_h @data.keys.each_with_object({}) do |key, h| h[key] = @data[key].to_h h end end