Module katja_writer

The katja_writer module is responsible for sending metrics to Riemann.

Copyright © ?? Daniel Kempkens

Version: Apr 13 2020 14:27:19

Behaviours: gen_server.

Authors: Daniel Kempkens (daniel@kempkens.io).

Description

The katja_writer module is responsible for sending metrics to Riemann.

Function Index

send_entities/3Sends multiple entities (events and/or states) to Riemann.
send_entities_async/4Sends multiple entities (events and/or states) to Riemann asynchronously.
send_event/3Sends an event to Riemann.
send_event_async/4Sends an event to Riemann asynchronously.
send_state/3Sends a state to Riemann.
send_state_async/4Sends a state to Riemann asynchronously.
start_link/0Starts a writer server process.
start_link/1Starts a writer server process and registers it as katja_writer.
stop/1Stops a writer server process.

Function Details

send_entities/3

send_entities(Pid::katja:process(), Transport::katja_connection:transport(), Data::katja:entities()) -> ok | {error, term()}

Sends multiple entities (events and/or states) to Riemann.
If you do not set the time field manually, it will default to the local system time.
You can set default values for host, tags and ttl using the defaults configuration option.

Converting the states and events (inside the Data parameter) to a format that can be serialized happens inside the process calling this function.

send_entities_async/4

send_entities_async(Pid::katja:process(), Transport::katja_connection:transport(), Data::katja:entities(), SampleRate::katja:sample_rate()) -> ok

Sends multiple entities (events and/or states) to Riemann asynchronously. SampleRate is used to randomly drop some entities. Setting it to 1.0 will send all the data, but might lead to overload.
If sending the entities fails, you will not be notified about it.
See the send_entities/3 documentation for more details.

send_event/3

send_event(Pid::katja:process(), Transport::katja_connection:transport(), Data::katja:event()) -> ok | {error, term()}

Sends an event to Riemann.
If you do not set the time field manually, it will default to the local system time.
You can set default values for host, tags and ttl using the defaults configuration option.

Converting Data to a format that can be serialized happens inside the process calling this function.

send_event_async/4

send_event_async(Pid::katja:process(), Transport::katja_connection:transport(), Data::katja:event(), SampleRate::katja:sample_rate()) -> ok

Sends an event to Riemann asynchronously. SampleRate is used to randomly drop some events. Setting it to 1.0 will send all the data, but might lead to overload.
If sending the event fails, you will not be notified about it.
See the send_event/3 documentation for more details.

send_state/3

send_state(Pid::katja:process(), Transport::katja_connection:transport(), Data::katja:state()) -> ok | {error, term()}

Sends a state to Riemann.
If you do not set the time field manually, it will default to the local system time.
You can set default values for host, tags and ttl using the defaults configuration option.

Converting Data to a format that can be serialized happens inside the process calling this function.

send_state_async/4

send_state_async(Pid::katja:process(), Transport::katja_connection:transport(), Data::katja:event(), SampleRate::katja:sample_rate()) -> ok

Sends a state to Riemann asynchronously. SampleRate is used to randomly drop some states. Setting it to 1.0 will send all the data, but might lead to overload.
If sending the state fails, you will not be notified about it.
See the send_state/3 documentation for more details.

start_link/0

start_link() -> {ok, pid()} | ignore | {error, term()}

Starts a writer server process.

start_link/1

start_link(Args::register | [{atom(), term()}]) -> {ok, pid()} | ignore | {error, term()}

Starts a writer server process and registers it as katja_writer.

stop/1

stop(Pid::katja:process()) -> ok

Stops a writer server process.


Generated by EDoc