monitoring

package
v0.1.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2018 License: MPL-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package monitoring provides multiple implementations of runtime.Monitor.

In addition to supplying runtime.Monitor implementations this package also provides a ConfigSchema and a generic New(config) method that can be used to instantiate one of the implementations dependening on configuration. This allows for configurable selection of monitoring strategy without complicating the application with configuration.

Index

Constants

This section is empty.

Variables

View Source
var ConfigSchema schematypes.Schema = schematypes.OneOf{
	mockConfigSchema,
	monitorConfigSchema,
}

ConfigSchema for configuration given to New()

Functions

func New

func New(config interface{}, auth client.Auth) runtime.Monitor

New returns a runtime.Monitor strategy from config matching ConfigSchema.

func NewLoggingMonitor

func NewLoggingMonitor(logLevel string, tags map[string]string, syslogName string) runtime.Monitor

NewLoggingMonitor creates a monitor that just logs everything. This won't attempt to send anything to sentry or statsum.

func NewMonitor

func NewMonitor(project string, auth client.Auth, logLevel string, tags map[string]string, syslogName string) runtime.Monitor

NewMonitor creates a new monitor

func PreConfig added in v0.1.1

func PreConfig() runtime.Monitor

PreConfig returns a default monitor for use before the configuration is loaded. This logs at the INFO level to stderr.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL