Membrane.Telemetry.TimescaleDB.Model.Element (Membrane Telemetry TimescaleDB v0.1.0) View Source
Model used to store information about when elements have been created and then terminated.
This model may look similar to ComponentPath as it may contain the same path but it does much more.
When element gets created we persist a record with the element's path, time of the event
and terminated field set to false and arbitrary metadata at the moment of initializing
the element. When elements gets terminated we once again persist the element's path, the time and this time terminated field set to true
and once again the arbitrary metadata (currently logger's metadata).
Thanks to the 2 records we can tell when the element was created and terminated therefore telling for how long it had lived.
Link to this section Summary
Link to this section Types
Specs
t() :: %Membrane.Telemetry.TimescaleDB.Model.Element{
__meta__: term(),
metadata: map() | nil,
path: String.t() | nil,
terminated: boolean() | nil,
time: NaiveDateTime.t() | nil
}
Link to this section Functions
Specs
changeset(t(), map()) :: Ecto.Changeset.t()