Skip to content

Module hb_event.erl

Wrapper for incrementing prometheus counters.

Function Index

await_prometheus_started/0*Delay the event server until prometheus is started.
counters/0Return a message containing the current counter values for all logged HyperBEAM events.
handle_events/0*
handle_tracer/3*
increment/3Increment the counter for the given topic and message.
increment/4
log/1Debugging log logging function.
log/2
log/3
log/4
log/5
log/6
parse_name/1*
raw_counters/0*
server/0*

Function Details

await_prometheus_started/0 *

await_prometheus_started() -> any()

Delay the event server until prometheus is started.

counters/0

counters() -> any()

Return a message containing the current counter values for all logged HyperBEAM events. The result comes in a form as follows: /GroupName/EventName -> Count Where the EventName is derived from the value of the first term sent to the ?event(...) macros.

handle_events/0 *

handle_events() -> any()

handle_tracer/3 *

handle_tracer(Topic, X, Opts) -> any()

increment/3

increment(Topic, Message, Opts) -> any()

Increment the counter for the given topic and message. Registers the counter if it doesn't exist. If the topic is global, the message is ignored. This means that events must specify a topic if they want to be counted, filtering debug messages. Similarly, events with a topic that begins with debug are ignored.

increment/4

increment(Topic, Message, Opts, Count) -> any()

log/1

log(X) -> any()

Debugging log logging function. For now, it just prints to standard error.

log/2

log(Topic, X) -> any()

log/3

log(Topic, X, Mod) -> any()

log/4

log(Topic, X, Mod, Func) -> any()

log/5

log(Topic, X, Mod, Func, Line) -> any()

log/6

log(Topic, X, Mod, Func, Line, Opts) -> any()

parse_name/1 *

parse_name(Name) -> any()

raw_counters/0 *

raw_counters() -> any()

server/0 *

server() -> any()