Reporters

Reporters called once a webhook has been received from Burrow

synopsis:Reporter Blueprint

Reporter endpoint of the application

karrot.reporters.controllers.display(reporter)[source]

Returns a simple JSON with the current application reporters.

Parameters:reporter (str) – If provided returns details about this reporter only
Returns:json – A JSON with the following format:

{"reporters": ["reporter1", "reporter2"]}

class karrot.reporters.models.Reporter(name)[source]

Bases: object

process(event)[source]

Refresh the object with the event details. A child class should call this parent function and then implement the proper processing steps for the event.

Parameters:event (str) – A
stats(reporter)[source]

Report stats of an other reporter. Useful for Prometheus to collect stats about other reporters.

This method must be implemented in child classes.

class karrot.reporters.factory.ReporterFactory[source]

Bases: object

ReporterFactory used to create a Reporter object based on it’s name.

static get(reporter)[source]

Return the proper notifier object based on the name.

Params str reporter:
 The type of reporter to create
Returns:Reporter – A reporter matching reporter
Raises:ValueError – When the requested reporter is not found.