View Source Datadog.DataStreams.Payload (Data Streams Ex v1.2.2)
Encoding logic for a payload. This is the top level struct we send to Datadog. It wraps all other information. These are primarily sent via MessagePack, although uses Protobuf encoded binary for latency records.
Summary
Functions
Adds an aggregator bucket to the payload.
Adds a map of buckets. This is the format the the aggregator uses internally. We throw out the hash and just keep the buckets.
Encodes the payload via MessagePack.
Creates a new payload with the environment, service, and primary_tag
filled in from the Datadog.DataStreams.Config
module.
Returns how many stats are in the payload.
Types
Functions
Adds an aggregator bucket to the payload.
@spec add_buckets( t(), %{required(non_neg_integer()) => Datadog.DataStreams.Aggregator.Bucket.t()}, Datadog.DataStreams.Payload.Point.timestamp_type() ) :: t()
Adds a map of buckets. This is the format the the aggregator uses internally. We throw out the hash and just keep the buckets.
Encodes the payload via MessagePack.
@spec new() :: t()
Creates a new payload with the environment, service, and primary_tag
filled in from the Datadog.DataStreams.Config
module.
@spec stats_count(t()) :: non_neg_integer()
Returns how many stats are in the payload.