libhoney_ex v0.1.0 Libhoney.Event View Source
Provides functions for manipulating Event structs.
Link to this section Summary
Functions
Returns an Event struct with a key/value pair added to the fields.
Returns an Event struct. All parameters are optional and will be defaulted to those set
in the mix config.
Link to this section Functions
Returns an Event struct with a key/value pair added to the fields.
iex> evt = Libhoney.Event.create("apples", "pears", "http://api.honeycomb.io", 1, 1512482945)
iex> evt |> Libhoney.Event.add_field("name", "Rick Anchez")
%Libhoney.Event{api_host: "http://api.honeycomb.io", dataset: "pears",
fields: %{"name" => "Rick Sanchez"}, sample_rate: 1, timestamp: 1512482945, write_key: "apples"}
Returns an Event struct. All parameters are optional and will be defaulted to those set
in the mix config.
iex> Libhoney.Event.create("apples", "pears", "http://api.honeycomb.io", 1, 1512482945)
%Libhoney.Event{api_host: "http://api.honeycomb.io", dataset: "pears",
fields: %{}, sample_rate: 1, timestamp: 1512482945, write_key: "apples"}