Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.18 KB

README.md

File metadata and controls

34 lines (25 loc) · 1.18 KB

cloudmetrics

Build Status GoDoc

This is a reporter for the go-metrics that will posts metrics to CloudWatch.

Usage

import "github.com/savaki/cloudmetrics"

go cloudmetrics.Publish(metrics.DefaultRegistry,
    "/sample/", // namespace
)

Configuration

cloudmetrics supports a number of configuration options

import "github.com/savaki/cloudmetrics"

go cloudmetrics.Publish(metrics.DefaultRegistry,
    "/sample/",                                      // namespace
    cloudmetrics.Dimensions("k1", "v1", "k2", "v2"), // allows for custom dimensions
    cloudmetrics.Interval(time.Minutes * 5),         // custom interval
    cloudmetrics.Context(context.Background()),      // enables graceful shutdown via golang.org/x/net/context 
    cloudmetrics.Percentiles([]float64{.5, .99}),    // customize percentiles for histograms and timers 
)