network-metrics-0.2.8: Send metrics to Ganglia, Graphite, and statsd.

Portabilitynon-portable (GHC extensions)
Stabilityexperimental
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Safe HaskellNone

Network.Metric

Contents

Description

 

Synopsis

Exported Types

data SinkType Source

An enumeration of supplied sink types

Constructors

Ganglia 
Graphite 
Statsd 
Stdout 

Re-exports

type Group = ByteStringSource

Metric group

type Bucket = ByteStringSource

Metric bucket

class Measurable a whereSource

Measure a type for a collection of metrics

Methods

measure :: a -> [Metric]Source

Convert a measurable instance from a host into a list of metrics

class (Show a, Typeable a) => Encodable a whereSource

Metric value to be encoded

Methods

encode :: a -> ByteStringSource

Encode the value as a bytestring

class Sink a whereSource

Sink resource to write metrics to

Methods

push :: Measurable b => a -> b -> IO ()Source

Write a metric to the sink.

close :: a -> IO ()Source

Close the sink - subsequent writes will throw an error.

Instances

Sink AnySink

Existential sink instance

Sink Ganglia 
Sink SinkHandle 

data AnyMeasurable Source

Any instance of the Measurable type class

Constructors

forall a . Measurable a => AnyMeasurable a 

data AnySink Source

Any instance of the Sink type class

Constructors

forall a . Sink a => AnySink a 

Instances

Sink AnySink

Existential sink instance

open :: SinkType -> Host -> HostName -> PortNumber -> IO AnySinkSource

Open a new sink specified by SinkType