Skip to content

Collect runtime metrics for your Go application.

License

Notifications You must be signed in to change notification settings

jelmersnoeck/stats

Repository files navigation

Stats

Build Status GoDoc

Stats is a statistics collection library for your Go applications. It collects data on a regular, configurable interval and sends it to a configurable collections client.

Supported statistics

  • Memory usage
  • Goroutines
  • Garbage Collection
  • CGO Calls

Supported collector clients

  • statsd

Example

package main

import (
    "github.com/jelmersnoeck/stats"
    "github.com/jelmersnoeck/stats/clients/statsd"
)

func main() {
    cl, err := statsd.New()
    if err != nil {
        // error connecting to statsd
    }

    s := stats.New(stats.Client(cl))
    go s.Collect()
}

About

Collect runtime metrics for your Go application.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages