Skip to content

readmill/metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


    metrics

    go metrics client


* rationale

  To avoid coupling code with a specific metrics backend (ex: riemann), we provide
  a simple abstraction over backends, which is configurable via the command-line.

* synopsis

  // Import the metrics library and register the "stdout" and
  // "stderr" backends.
  import (
      metrics "github.com/readmill/metrics"
      _       "github.com/readmill/metrics/std-logger"
  )

  func main() {
      metrics.SetPrefix("mysrv.")
      metrics.Use("stdout")
      metrics.Publish(&metrics.Event{
          Service: "inbound.requests",
          Metric:  1,
          Tags:    []string{"http"},
      })
  }

* backends

  - "stdout"
  - "stderr"
  - "riemann"

* docs

  go doc

* author

  Alexis Sellier <[email protected]>

Releases

No releases published

Packages

No packages published

Languages