Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Env is the environment identifier injected to the internally managed
// registry interface to annotate all metrics with the respective label, e.g.
// "env=staging".
Env string
// Fil is an optional error matcher to ignore certain errors returned by the
// executed worker handlers, in order to suppress their associated error logs.
// All errors will be logged by default.
Fil func(error) bool
// Log is a standard logger interface to forward structured log messages to
// any output interface e.g. stdout.
Log logger.Interface
// Met is the open telemetry meter interface injected to the internally
// managed registry interface. This meter will record all worker handler
// execution metrics.
Met metric.Meter
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry contains all necessary information to wrap user specific worker handlers within new metrics handlers when instantiating a new worker engine.
func (*Registry) Log ¶
Log returns the result of the configured filter function transparently. Exposing the injected filter here allows any worker handler to understand the same behaviour implemented inside of the metrics handler. E.g. an error intended to cancel the reconciliation loop should neither be considered a failure inside the metrics handler, as well as inside the worker engine.
Click to show internal directories.
Click to hide internal directories.