riemann.common
Utility functions. Time/date, some flow control constructs, protocol buffer definitions and codecs, some vector set ops, etc.
approx-equal
(approx-equal x y)
(approx-equal x y tol)
Returns true if x and y are roughly equal, such that x/y is within tol of unity.
custom-attributes
(custom-attributes event)
Returns a Map of the custom attributes of an Event.
decode-inputstream
(decode-inputstream s)
Decode an InputStream to a message. Decodes the protobuf representation of Msg and applies post-load-event to all events.
decode-msg
(decode-msg msg)
Decode a protobuf to a message. Decodes the protocol buffer representation of Msg and applies post-load-event to all events.
deprecated
macro
(deprecated comment & body)
Wraps body in an implicit (do), and logs a deprecation notice when invoked.
exception->event
(exception->event exception)
(exception->event e original)
Creates an event from an Exception.
get-hostname
(get-hostname [age val])
Fetches the hostname by shelling out to hostname (1), whenever the given age is stale enough. If the given age is recent, as defined by hostname-refresh-interval, returns age and val instead.
human-uniq
(human-uniq things type)
Returns a human-readable string describing things, e.g.
importer api1, api2, api4 23 services
post-load-event
(post-load-event e)
After events are loaded, we assign default times if none exist.
re-matches?
(re-matches? re string)
Does the given regex match string? Nil if string is nil.