abstract class OpenTelemetry::API::AbstractResource

Included Modules

Direct Known Subclasses

Defined in:

api/abstract_resource.cr

Constructors

Instance Method Summary

Instance methods inherited from module OpenTelemetry::Sendable

size size, to_json(json : JSON::Builder)
to_json
to_json
, to_protobuf to_protobuf

Constructor Detail

def self.new(attrs) #

Create a new Resource that has been intialized by the provided key/value pairs. This initialization will support any seed object that provides an #each method which takes a two-argument block.


[View source]
def self.new #

Create an empty Resource.


[View source]

Instance Method Detail

abstract def [](key) #

Retrieve the value for a key in the Resource.


[View source]
abstract def []=(key, value) #

Assign a value to a key in the Resource.


[View source]
abstract def []?(key) #

Retrieve a value for a key in the Resource. Return nil instead of an exception if the key is not present.


[View source]
abstract def attributes #

[View source]
abstract def attributes=(attributes : Hash(String, AnyAttribute)) #

[View source]
abstract def dropped_attribute_count #

[View source]
abstract def dropped_attribute_count=(dropped_attribute_count : UInt32) #

[View source]
abstract def empty? #

Return true if the resource is empty.


[View source]
abstract def get_attribute(key) #

Alias for #[]


[View source]
abstract def get_attribute?(key) #

Alias for #[]?


[View source]
abstract def set_attribute(key, value) #

Alias for #[]=


[View source]
abstract def to_json(json : JSON::Builder) #

[View source]
abstract def to_json #

Export the resource with a JSON representation.


[View source]
abstract def to_protobuf #

Export the resource to its protocol buffer representation.


[View source]