autowire

package
v0.0.0-...-b7aefed Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2014 License: Apache-2.0, Apache-2.0, BSD-2-Clause-Views, + 2 more Imports: 8 Imported by: 0

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

View Source
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

func InstrumentedHandler(handler http.Handler) http.Handler

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.

Jump to

Keyboard shortcuts

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