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.
66 67 68 69 70 71 72 |
# File 'lib/atatus/transport/serializers.rb', line 66 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.
74 75 76 |
# File 'lib/atatus/transport/serializers.rb', line 74 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.
74 75 76 |
# File 'lib/atatus/transport/serializers.rb', line 74 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.
74 75 76 |
# File 'lib/atatus/transport/serializers.rb', line 74 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.
74 75 76 |
# File 'lib/atatus/transport/serializers.rb', line 74 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.
74 75 76 |
# File 'lib/atatus/transport/serializers.rb', line 74 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.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/atatus/transport/serializers.rb', line 75 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 |