Class: ElasticAPM::Transport::Serializers::MetricsetSerializer Private

Inherits:
Serializer
  • Object
show all
Defined in:
lib/elastic_apm/transport/serializers/metricset_serializer.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

Attributes inherited from Serializer

#config

Instance Method Summary collapse

Methods inherited from Serializer

#initialize

Constructor Details

This class inherits a constructor from ElasticAPM::Transport::Serializers::Serializer

Instance Method Details

#build(metricset) ⇒ 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.



8
9
10
11
12
13
14
15
16
# File 'lib/elastic_apm/transport/serializers/metricset_serializer.rb', line 8

def build(metricset)
  {
    metricset: {
      timestamp: metricset.timestamp.to_i,
      tags: keyword_object(metricset.tags),
      samples: build_samples(metricset.samples)
    }
  }
end