Giter Club home page Giter Club logo

go-metrics-charts's Introduction

go-metrics-charts

This project provides real-time live charting of internal metrics for applications that use the rcrowley/go-metrics metrics library. It began as a fork of github.com/mkevac/debugcharts, until it seemed cleaner to keep it separate.

This is intended as a simple live view of metrics in a single process without the need for an entire metrics stack - it can be useful when developing and testing locally. All third party dependencies are loaded from a CDN to keep the amount of embedded data to a minimum.

Browser Compatibility

The javascript code is written in ES6, so it requires a modern browser. It's been tested in Safari 10 and Chrome 54.

Installation

go get github.com/aalpern/go-metrics-charts

Usage

import "github.com/aalpern/go-metrics-charts"

metricscharts.Register()

You must have metrics exposed via expvars, as rather than having a binary depedency on the metrics package, the UI works by hitting the /debug/metrics JSON endpoint exposed by that package.

import "github.com/rcrowley/go-metrics/exp"

exp.Exp(metrics.DefaultRegistry)

The live charts page will be registered at /debug/metrics/charts.

screenshot

TO-DO

  • better handling of long list of metrics
  • set refresh period
  • limit the data to a rolling window of data points
  • Chart options - add stacked area, display data points
  • Responsive chart
  • pause/restart
  • merge runtime stats into metrics list for unified UI
  • implement filtering of metrics list
  • URL handling/generation

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.