Skip to content

getspine/go-metrics-honeycomb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

go-metrics-honeycomb

This is a simple reporter for rcrowley's go-metrics library, designed to work with the Honeycomb metrics reporting service.

For more information, check out the GoDoc.

Usage

Basic usage:

import (
  "time"

  "github.com/getspine/go-metrics-honeycomb"
  "github.com/rcrowley/go-metrics"
)

go honeycomb.Honeycomb(
  metrics.DefaultRegistry,
  60 * time.Second,      // Interval between sending metrics
  "your-write-key",      // Honeycomb write key
  "your-dataset",        // Honeycomb dataset
  []float64{0.95, 0.99}, // Percentiles to report from histograms
)

If you wish to add extra fields or other configuration to the Honeycomb client, you can use the following procedure:

import (
  "time"

  "github.com/getspine/go-metrics-honeycomb"
  "github.com/honeycombio/libhoney-go"
  "github.com/rcrowley/go-metrics"
)

reporter := honeycomb.NewReporter(
  metrics.DefaultRegistry,
  60 * time.Second,      // Interval between sending metrics
  "your-write-key",      // Honeycomb write key
  "your-dataset",        // Honeycomb dataset,
  []float64{0.95, 0.99}, // Percentiles to report from histograms
)

libhoney.AddField("philcollins", "sussudio")
...

go reporter.Run()

Installation

$ go get github.com/getspine/go-metrics-honeycomb

Bugs

If you run into any bugs, please drop an issue on our GitHub and we'll be sure to have a look.

Releases

No releases published

Packages

No packages published

Languages