Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
Event is raised when something interesting happens in the application. Consists of a name an a map of key/value pairs.
type LogChans ¶
type LogChans struct { // CountChan increases the named Prometheus counter. CountChan chan Metric // GaugeChan increases the named Prometheus gauge. GaugeChan chan Metric // ErrorChan sends the error to Application Insights. ErrorChan chan error // EventChan sends the event to Application Insights. EventChan chan Event // DebugChan prints a debug message to the console. DebugChan chan string }
LogChans a set of channels used for communicating events, metrics, errors and other telemetry types to the logger.
func Start ¶
Start starts the logger in a go routine and returns a set of channels that can be used to send telemetry to the logger.
func StartEmpty ¶ added in v0.0.7
func StartEmpty() LogChans
StartEmpty starts a logger that doesn't log anything, but that will not block when log events are sent on the logging channels, the purpose being to provide support for testing scenarios when logging is not in focus.
type Options ¶ added in v0.0.6
type Options struct { // SystemName the name of the containing system. SystemName string // The name of the running application/micro-service. AppName string // AppInsightsSecretPath the path to Application Insights instrumentation key in Vault. AppInsightsSecretPath string // SendMetricsToAppInsights indicates whether metrics should be sent to Application Insights // in addition to Prometheus. SendMetricsToAppInsights bool }
Options is used to configure the functionality of this entire module.