Class: ElasticAPM::Metricset Private
- Inherits:
-
Object
- Object
- ElasticAPM::Metricset
- Defined in:
- lib/elastic_apm/metricset.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
- #samples ⇒ Object readonly private
- #span ⇒ Object private
- #tags ⇒ Object private
- #timestamp ⇒ Object private
- #transaction ⇒ Object private
Instance Method Summary collapse
- #empty? ⇒ Boolean private
-
#initialize(timestamp: Util.micros, tags: nil, transaction: nil, span: nil, **samples) ⇒ Metricset
constructor
private
A new instance of Metricset.
- #inspect ⇒ Object private
- #merge_tags!(tags) ⇒ Object private
- #tags? ⇒ Boolean private
Constructor Details
#initialize(timestamp: Util.micros, tags: nil, transaction: nil, span: nil, **samples) ⇒ Metricset
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 Metricset.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/elastic_apm/metricset.rb', line 23 def initialize( timestamp: Util.micros, tags: nil, transaction: nil, span: nil, **samples ) @timestamp = @tags = @transaction = transaction @span = span @samples = samples end |
Instance Attribute Details
#samples ⇒ 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.
38 39 40 |
# File 'lib/elastic_apm/metricset.rb', line 38 def samples @samples end |
#span ⇒ 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.
37 38 39 |
# File 'lib/elastic_apm/metricset.rb', line 37 def span @span end |
#tags ⇒ 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.
37 38 39 |
# File 'lib/elastic_apm/metricset.rb', line 37 def @tags end |
#timestamp ⇒ 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.
37 38 39 |
# File 'lib/elastic_apm/metricset.rb', line 37 def @timestamp end |
#transaction ⇒ 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.
37 38 39 |
# File 'lib/elastic_apm/metricset.rb', line 37 def transaction @transaction end |
Instance Method Details
#empty? ⇒ Boolean
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.
51 52 53 |
# File 'lib/elastic_apm/metricset.rb', line 51 def empty? samples.empty? end |
#inspect ⇒ 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.
55 56 57 58 59 60 61 |
# File 'lib/elastic_apm/metricset.rb', line 55 def inspect "<ElasticAPM::Metricset timestamp:#{}" \ " transaction:#{transaction.inspect}" \ " span:#{span.inspect}" \ " tags:#{.inspect}" \ " samples:#{samples.inspect}>" end |
#merge_tags!(tags) ⇒ 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.
40 41 42 43 44 45 |
# File 'lib/elastic_apm/metricset.rb', line 40 def () return unless @tags ||= {} @tags.merge! end |
#tags? ⇒ Boolean
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.
47 48 49 |
# File 'lib/elastic_apm/metricset.rb', line 47 def &.any? end |