Documentation ¶
Overview ¶
Package autowire provides sensible defaults for using dropsonde.
The default HTTP transport is instrumented, as well as some basic stats about the Go runtime. Additionally, the default emitter is itself instrumented to periodically send "heartbeat" messages containing counts of received and sent events. The default emitter sends events over UDP.
Use ¶
Set the DROPSONDE_ORIGIN and DROPSONDE_DESTINATION environment variables. (See Initialize below for details.) Anonymously import autowire:
import ( _ "github.com/cloudfoundry/dropsonde/autowire" )
The package self-initializes and automatically adds instrumentation where it can.
Index ¶
Constants ¶
const DefaultDestination = "localhost:3457"
Variables ¶
This section is empty.
Functions ¶
func AutowiredEmitter ¶
func AutowiredEmitter() emitter.EventEmitter
func CreateDefaultEmitter ¶
func CreateDefaultEmitter() (emitter.EventEmitter, string)
func Initialize ¶
func Initialize(emitter emitter.EventEmitter)
Initialize creates default emitters and instruments the default HTTP transport.
The DROPSONDE_ORIGIN environment variable is required and specifies the source name for all metrics emitted by this process. If it is not set, the program will run normally but will not emit metrics.
The DROPSONDE_DESTINATION environment variable sets the host and port to which metrics are sent. It is optional, and defaults to DefaultDestination.
func InstrumentedHandler ¶
InstrumentedHandler returns a Handler pre-configured to emit HTTP server request metrics to autowire's Emitter.
func InstrumentedRoundTripper ¶
func InstrumentedRoundTripper(roundTripper http.RoundTripper) http.RoundTripper
InstrumentedRoundTripper returns a RoundTripper pre-configured to emit HTTP client request metrics to autowire's Emitter.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package logs provides a simple API for sending app logs from STDOUT and STDERR through the dropsonde system.
|
Package logs provides a simple API for sending app logs from STDOUT and STDERR through the dropsonde system. |
Package metrics provides a simple API for sending value and counter metrics through the dropsonde system.
|
Package metrics provides a simple API for sending value and counter metrics through the dropsonde system. |