Git Product home page Git Product logo

go-runtime-metrics's Introduction

go-runtime-metrics

Collect Golang Runtime Metrics, outputting to a stats handler (currently, statsd)

The intent of this library is to be a "side effect" import. You can kick off the collector merely by importing this into your main:

import _ "github.com/bmhatfield/go-runtime-metrics"

This library has a few optional flags it depends on. It won't be able to output stats until you call flag.Parse(), which is generally done in your func main() {}.

Once imported and running, you can expect a number of Go runtime metrics to be sent to statsd over UDP. An example of what this looks like:

Dashboard Screenshot

go-runtime-metrics's People

Contributors

adamvduke avatar bmhatfield avatar broady avatar cgilling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-runtime-metrics's Issues

Change to be usable as a library

I was wondering what you would think about factoring out the main functionality into a library (sub package) that could be used without the need of flags to configure it. I was thinking that perhaps you could use a config struct to configure the sub package with the config that is currently coming from the flags. You could then still have the auto run on import package work the way it does with the flags feeding the config struct and calling the sub package.

Is there any interest in doing this? This code looks really useful, but most of the code that I work on doesn't use flags for configuration so it would be hard to integrate the package as is, and if possible I'd prefer to not copy it all somewhere else for my particular use. If this is something that would be acceptable I could code up a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.