class Datadog::Statsd::Serialization::Serializer
Attributes
Public Class Methods
Source
# File lib/datadog/statsd/serialization/serializer.rb, line 9 def initialize(prefix: nil, container_id: nil, external_data: nil, global_tags: []) @stat_serializer = StatSerializer.new(prefix, container_id, external_data, global_tags: global_tags) @service_check_serializer = ServiceCheckSerializer.new(container_id, external_data, global_tags: global_tags) @event_serializer = EventSerializer.new(container_id, external_data, global_tags: global_tags) end
Public Instance Methods
Source
# File lib/datadog/statsd/serialization/serializer.rb, line 26 def to_event(title, text, options = EMPTY_OPTIONS) event_serializer.format(title, text, options) end
using *args would make new allocations
Source
# File lib/datadog/statsd/serialization/serializer.rb, line 21 def to_service_check(name, status, options = EMPTY_OPTIONS) service_check_serializer.format(name, status, options) end
using *args would make new allocations
Source
# File lib/datadog/statsd/serialization/serializer.rb, line 16 def to_stat(name, delta, type, tags: [], sample_rate: 1, cardinality: nil) stat_serializer.format(name, delta, type, tags: tags, sample_rate: sample_rate, cardinality: cardinality) end
using *args would make new allocations