Very simple charts with some debug data for Go programs

Overview

debugcharts Build Status

Go memory debug charts.

This package uses Plotly chart library. It is open source and free for use.

Installation

go get -v -u github.com/mkevac/debugcharts

Usage

Just install package and start http server. There is an example program here.

Then go to http://localhost:8080/debug/charts. You should see something like this:

Data is updated every second. We keep data for last day.

User https://github.com/dgryski/ proposed interesing way for turning debugcharts on/off for your project:

You can add tagged file like this in your code

// +build debugcharts

package main

import _ "github.com/mkevac/debugcharts"

If you want to use debugcharts, then build your project with -tags debugcharts

Development

I use bindata to pack binary files into executable. Run make to rebuild.

Issues
  • http.ServeMux

    http.ServeMux

    Hi, remove init() and create func that will returned http.ServeMux server with all necessary handlers to allow developers to choose addr and port. And hide Assert funcs (if you have not many time let me do this)

    opened by ivan1993spb 9
  • date/time is wrong with the chart

    date/time is wrong with the chart

    hi, very useful chart package. However, the chart is show date/time starting Jan 17, 9:52am. Have not investigated why.

    thanks, eddie

    opened by maded2 6
  • Why does the heap keep growing

    Why does the heap keep growing

    image

    Why does the heap keep growing

    Memory is not leaking and it keeps growing

    opened by shumintao 4
  • add gin web fremework support for this project

    add gin web fremework support for this project

    i am using gin, so i made life easier

    opened by mintzhao 3
  • calls to log.Fatal() make me nervous

    calls to log.Fatal() make me nervous

    Errors happen all the time at scale. I'm hesitant to deploy a service to production built with this knowing that log.Fatal() might be called and my application would exit. I think log.Println/return pair would be sufficient in most of the cases.

    Alternatively have it configurable with a package-level variable.

    opened by dgryski 3
  • no charts, errors in console

    no charts, errors in console

    when accessing charts i see only one empty chart and a bunch of errors in console:

    Uncaught TypeError: Cannot read property 'length' of null
        at new m (plotly-latest.min.js:7)
        at m (plotly-latest.min.js:7)
        at Object.plot (plotly-latest.min.js:7)
        at d (plotly-latest.min.js:7)
        at Object.r.plot (plotly-latest.min.js:7)
        at r.drawData (plotly-latest.min.js:7)
        at Object.l.syncOrAsync (plotly-latest.min.js:7)
        at Object.r.plot (plotly-latest.min.js:7)
        at Object.r.newPlot (plotly-latest.min.js:7)
        at Object.success (main.js:26)
    m @ plotly-latest.min.js:7
    m @ plotly-latest.min.js:7
    plot @ plotly-latest.min.js:7
    d @ plotly-latest.min.js:7
    r.plot @ plotly-latest.min.js:7
    r.drawData @ plotly-latest.min.js:7
    l.syncOrAsync @ plotly-latest.min.js:7
    r.plot @ plotly-latest.min.js:7
    r.newPlot @ plotly-latest.min.js:7
    (anonymous) @ main.js:26
    j @ jquery-2.1.4.min.js:2
    fireWith @ jquery-2.1.4.min.js:2
    x @ jquery-2.1.4.min.js:4
    (anonymous) @ jquery-2.1.4.min.js:4
    load (async)
    send @ jquery-2.1.4.min.js:4
    ajax @ jquery-2.1.4.min.js:4
    n.(anonymous function) @ jquery-2.1.4.min.js:4
    getJSON @ jquery-2.1.4.min.js:4
    (anonymous) @ main.js:17
    j @ jquery-2.1.4.min.js:2
    fireWith @ jquery-2.1.4.min.js:2
    ready @ jquery-2.1.4.min.js:2
    I @ jquery-2.1.4.min.js:2
    4plotly-latest.min.js:7 Uncaught Error: gd.data must be an array
        at plotly-latest.min.js:7
        at I (plotly-latest.min.js:7)
        at Object.t [as extendTraces] (plotly-latest.min.js:7)
        at WebSocket.ws.onmessage (main.js:117)
    

    may be chart lib was updated?

    opened by Vasiliy-Bondarenko 3
  • run error

    run error

    panic: runtime error: invalid memory address or nil pointer dereference
    [signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ad1a0]
    
    goroutine 19 [running]:
    github.com/mkevac/debugcharts.(*server).gatherData(0xa9bc60)
            C:/golang/gowork/src/github.com/mkevac/debugcharts/debugcharts.go:112 +0x210
    created by github.com/mkevac/debugcharts.init.1
            C:/golang/gowork/src/github.com/mkevac/debugcharts/debugcharts.go:158 +0x2f9
    exit status 2
    
    opened by lengrongfu 2
  • add chart for monitoring CPU usage

    add chart for monitoring CPU usage

    add chart for monitoring CPU usage, thanks.

    opened by czh030509 1
  • Migrate to a fully open-source javascript charting library.

    Migrate to a fully open-source javascript charting library.

    Highcharts is a great product, but the licensing terms aren't. Please switch to a library like flot that has less restrictive license terms.

    opened by dgryski 1
  • goroutine count is wrong

    goroutine count is wrong

    image image

    opened by Skyler1017 0
  • add expvars support

    add expvars support

    That will be great.

    Or how to add expvar to this? Can you read expvar automatically via enumerate exporing variables or smth like this?

    opened by MasterDimmy 2
  • 1.add check origin.

    1.add check origin.

    opened by lemoyxk 2
Owner
Marko Kevac
Marko Kevac
Simple logger for Go programs. Allows custom formats for messages.

go-logger A simple go logger for easy logging in your programs. Allows setting custom format for messages. Preview Install go get github.com/apsdehal/

Amanpreet Singh 271 Dec 4, 2021
Very powerful server agent for collecting & sending logs & metrics with an easy-to-use web console.

logkit-community 中文版 Introduce Very powerful server agent for collecting & sending logs & metrics with an easy-to-use web console. logkit-community De

Qiniu Cloud 1.2k Jan 10, 2022
Implements a deep pretty printer for Go data structures to aid in debugging

go-spew Go-spew implements a deep pretty printer for Go data structures to aid in debugging. A comprehensive suite of tests with 100% test coverage is

Dave Collins 4.8k Jan 10, 2022
A flexible process data collection, metrics, monitoring, instrumentation, and tracing client library for Go

Package monkit is a flexible code instrumenting and data collection library. See documentation at https://godoc.org/gopkg.in/spacemonkeygo/monkit.v3 S

Space Monkey Go 461 Dec 28, 2021
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

The open-source platform for monitoring and observability. Grafana allows you to query, visualize, alert on and understand your metrics no matter wher

Grafana Labs 46.3k Jan 7, 2022
Open source framework for processing, monitoring, and alerting on time series data

Kapacitor Open source framework for processing, monitoring, and alerting on time series data Installation Kapacitor has two binaries: kapacitor – a CL

InfluxData 2.1k Jan 4, 2022
Golang beautify data display for Humans

Golang beautify data display for Humans English 简体中文 Usage Examples package main import ( ffmt "gopkg.in/ffmt.v1" ) func main() { example() } typ

ffmt 248 Jan 12, 2022
pprof is a tool for visualization and analysis of profiling data

Introduction pprof is a tool for visualization and analysis of profiling data. pprof reads a collection of profiling samples in profile.proto format a

Google 5k Jan 10, 2022
Litter is a pretty printer library for Go data structures to aid in debugging and testing.

Litter Litter is a pretty printer library for Go data structures to aid in debugging and testing. Litter is provided by Sanity: The Headless CMS Const

Sanity 1.3k Jan 1, 2022
Visualise Go program GC trace data in real time

This project is no longer maintained I'm sorry but I do not have the bandwidth to maintain this tool. Please do not send issues or PRs. Thank you. gcv

Dave Cheney 1.1k Jan 11, 2022
Parametrized JSON logging library in Golang which lets you obfuscate sensitive data and marshal any kind of content.

Noodlog Summary Noodlog is a Golang JSON parametrized and highly configurable logging library. It allows you to: print go structs as JSON messages; pr

Gyoza Tech 35 Dec 29, 2021
Interfaces for LZ77-based data compression

Pack Interfaces for LZ77-based data compression. Introduction Many compression libraries have two main parts: Something that looks for repeated sequen

Andy Balholm 3 Oct 19, 2021
mtail - extract internal monitoring data from application logs for collection into a timeseries database

mtail - extract internal monitoring data from application logs for collection into a timeseries database mtail is a tool for extracting metrics from a

Google 3k Jan 3, 2022
Go Huobi Market Price Data Monitor

火币(Huobi)价格监控 由于部分交易对火币官方未提供价格监控,因此写了个小程序,长期屯币党可以用它来提醒各种现货价格。 该工具只需要提前安装Go环境和Redis即可。 消息推送使用的「钉钉」,需要提前配置好钉钉机器人(企业群类型、带webhook的机器人)。 使用方法 下载本项目 拷贝根目录下

ROC 2 Sep 24, 2021
Beta tool to normalize Orbit member data

Orbit Normalize Member Data Thanks for checking out my handy tool to work with Orbit's api. Everything is written in go and will continue to be update

Peter ONeill 2 Sep 16, 2021
Secure logger in Go to avoid output sensitive data in log

zlog A main distinct feature of zlog is secure logging that avoid to output secret/sensitive values to log. The feature reduce risk to store secret va

Masayoshi Mizutani 18 Dec 21, 2021
Go-bqstreamer - Stream data into Google BigQuery concurrently using InsertAll()

Kik and me (@oryband) are no longer maintaining this repository. Thanks for all the contributions. You are welcome to fork and continue development. B

Kik 132 Oct 18, 2021
Simple and blazing fast lockfree logging library for golang

glg is simple golang logging library Requirement Go 1.11 Installation go get github.com/kpango/glg Example package main import ( "net/http" "time"

Yusuke Kato 136 Jan 3, 2022
Simple and configurable Logging in Go, with level, formatters and writers

go-log Logging package similar to log4j for the Golang. Support dynamic log level Support customized formatter TextFormatter JSONFormatter Support mul

Guoqiang Chen 11 Feb 21, 2021