Class: Atatus::Transport::Serializers::Container Private
- Inherits:
-
Object
- Object
- Atatus::Transport::Serializers::Container
- Defined in:
- lib/atatus/transport/serializers.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.
Instance Attribute Summary collapse
- #error ⇒ Object readonly private
- #metadata ⇒ Object readonly private
- #metricset ⇒ Object readonly private
- #span ⇒ Object readonly private
- #transaction ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(config) ⇒ Container
constructor
private
A new instance of Container.
- #serialize(resource) ⇒ Object private
Constructor Details
#initialize(config) ⇒ Container
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 Container.
68 69 70 71 72 73 74 |
# File 'lib/atatus/transport/serializers.rb', line 68 def initialize(config) @transaction = Serializers::TransactionSerializer.new(config) @span = Serializers::SpanSerializer.new(config) @error = Serializers::ErrorSerializer.new(config) @metadata = Serializers::MetadataSerializer.new(config) @metricset = Serializers::MetricsetSerializer.new(config) end |
Instance Attribute Details
#error ⇒ Object (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.
76 77 78 |
# File 'lib/atatus/transport/serializers.rb', line 76 def error @error end |
#metadata ⇒ Object (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.
76 77 78 |
# File 'lib/atatus/transport/serializers.rb', line 76 def @metadata end |
#metricset ⇒ Object (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.
76 77 78 |
# File 'lib/atatus/transport/serializers.rb', line 76 def metricset @metricset end |
#span ⇒ Object (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.
76 77 78 |
# File 'lib/atatus/transport/serializers.rb', line 76 def span @span end |
#transaction ⇒ Object (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.
76 77 78 |
# File 'lib/atatus/transport/serializers.rb', line 76 def transaction @transaction end |
Instance Method Details
#serialize(resource) ⇒ 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.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/atatus/transport/serializers.rb', line 78 def serialize(resource) case resource when Transaction transaction.build(resource) when Span span.build(resource) when Error error.build(resource) when Metricset metricset.build(resource) when Metadata .build(resource) else raise UnrecognizedResource, resource.inspect end end |