Categorygithub.com/launchdarkly/go-metrics-cloudwatch
repository
0.0.0-20200310004215-ed22221aa3dc
Repository: https://github.com/launchdarkly/go-metrics-cloudwatch.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

go-metrics-cloudwatch

Reports go-metrics to cloudwatch.

Build Status

usage


import (
    "github.com/sclasen/go-metrics-cloudwatch/config"
    "github.com/sclasen/go-metrics-cloudwatch/reporter"
    "github.com/aws/aws-sdk-go/service/cloudwatch"
    "github.com/rcrowley/go-metrics"
)

registry := metrics.NewRegistry()
metricsConf := &config.Config{
		Client:            cloudwatch.New(...),
		Namespace:         "my-metrics-namespace",
		Filter:            &config.NoFilter{},
		ReportingInterval: 1 * time.Minute,
		StaticDimensions:  []map[string]string{"name":"value"},
	}
go reporter.Cloudwatch(registry, metricsConf)