Giter Club home page Giter Club logo

go-metrics-graphite's People

Contributors

cyberdelia avatar dt avatar kevingessner 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

Watchers

 avatar  avatar  avatar

go-metrics-graphite's Issues

Doesn't support Healthcheck

I created Health Check metrics but I get a console notifications that unable to record
2017/03/20 08:02:14 unable to record metric of type *metrics.StandardHealthcheck
You can find implementation for log output there

Resolving Graphite address on each flush operation

Hi, I wanted to use this library to collect metrics to a infrastructure where Graphite hosts are stored in a DNS. Passing Graphite address as a net.net.TCPAddr means that you can loose future metrics when one of Graphite hosts in cluster will be replaced.

So I've changed Graphite() interface to accept address as a string and use it on each flush operation.
https://github.com/cyberdelia/go-metrics-graphite/compare/master...kamilchm:master?expand=1

What do you think about such change?

Failing tests

Hello,

Tests are randomnly failing with accept tcp 127.0.0.1:36349: use of closed network connection error. There also some race issues in they way the tests work, t.Log, t.Fatalf and friends are not goroutine safe (see https://golang.org/pkg/testing/#T), but NewTestServer calls them inside the accept goroutine.

$ go test -race -v .
=== RUN   TestWrites                                                              
--- PASS: TestWrites (8.02s)
	graphite_test.go:56: recv foobar.foo.count 2
	graphite_test.go:56: recv foobar.foo.count_ps 200
	graphite_test.go:56: recv foobar.bar.count 40
	graphite_test.go:56: recv foobar.bar.one-minute 5
	graphite_test.go:56: recv foobar.bar.five-minute 5
	graphite_test.go:56: recv foobar.bar.fifteen-minute 5
	graphite_test.go:56: recv foobar.bar.mean 5.12
	graphite_test.go:56: recv foobar.baz.count 5
	graphite_test.go:56: recv foobar.baz.count_ps 500
	graphite_test.go:56: recv foobar.baz.min 1000
	graphite_test.go:56: recv foobar.baz.max 5000
	graphite_test.go:56: recv foobar.baz.mean 3000
	graphite_test.go:56: recv foobar.baz.std-dev 1414.21
	graphite_test.go:56: recv foobar.baz.50-percentile 3000
	graphite_test.go:56: recv foobar.baz.75-percentile 4500
	graphite_test.go:56: recv foobar.baz.99-percentile 5000
	graphite_test.go:56: recv foobar.baz.999-percentile 5000
	graphite_test.go:56: recv foobar.baz.one-minute 0
	graphite_test.go:56: recv foobar.baz.five-minute 0
	graphite_test.go:56: recv foobar.baz.fifteen-minute 0
	graphite_test.go:56: recv foobar.baz.mean-rate 9491.45
	graphite_test.go:48: dummy server error: accept tcp 127.0.0.1:36349: use of closed network connection
==================
WARNING: DATA RACE
Read at 0x00c4200da133 by goroutine 8:
  testing.(*common).Fail()
      /usr/lib/go-1.10/src/testing/testing.go:508 +0x98
  testing.(*common).FailNow()
      /usr/lib/go-1.10/src/testing/testing.go:531 +0x38
  testing.(*common).Fatal()
      /usr/lib/go-1.10/src/testing/testing.go:591 +0x7c
  github.com/cyberdelia/go-metrics-graphite.NewTestServer.func1()
      /home/yatiohi/go/src/github.com/cyberdelia/go-metrics-graphite/graphite_test.go:48 +0x48c

Previous write at 0x00c4200da133 by goroutine 7:
  testing.tRunner.func1()
      /usr/lib/go-1.10/src/testing/testing.go:768 +0x325
  testing.tRunner()
      /usr/lib/go-1.10/src/testing/testing.go:783 +0x1a3

Goroutine 8 (running) created at:
  github.com/cyberdelia/go-metrics-graphite.NewTestServer()
      /home/yatiohi/go/src/github.com/cyberdelia/go-metrics-graphite/graphite_test.go:44 +0x201
  github.com/cyberdelia/go-metrics-graphite.TestWrites()
      /home/yatiohi/go/src/github.com/cyberdelia/go-metrics-graphite/graphite_test.go:81 +0x8a
  testing.tRunner()
      /usr/lib/go-1.10/src/testing/testing.go:777 +0x16d

Goroutine 7 (running) created at:
  testing.(*T).Run()
      /usr/lib/go-1.10/src/testing/testing.go:824 +0x564
  testing.runTests.func1()
      /usr/lib/go-1.10/src/testing/testing.go:1063 +0xa4
  testing.tRunner()
      /usr/lib/go-1.10/src/testing/testing.go:777 +0x16d
  testing.runTests()
      /usr/lib/go-1.10/src/testing/testing.go:1061 +0x4e1
  testing.(*M).Run()
      /usr/lib/go-1.10/src/testing/testing.go:978 +0x2cd
  main.main()
      _testmain.go:42 +0x22a
==================
panic: Fail in goroutine after TestWrites has completed

goroutine 21 [running]:
testing.(*common).Fail(0xc4200da0f0)
	/usr/lib/go-1.10/src/testing/testing.go:509 +0x1ba
testing.(*common).FailNow(0xc4200da0f0)
	/usr/lib/go-1.10/src/testing/testing.go:531 +0x39
testing.(*common).Fatal(0xc4200da0f0, 0xc420049ea8, 0x2, 0x2)
	/usr/lib/go-1.10/src/testing/testing.go:591 +0x7d
github.com/cyberdelia/go-metrics-graphite.NewTestServer.func1(0x6e7980, 0xc420098038, 0xc4200da0f0, 0xc42008c6f0, 0xc4200942d0)
	/home/yatiohi/go/src/github.com/cyberdelia/go-metrics-graphite/graphite_test.go:48 +0x48d
created by github.com/cyberdelia/go-metrics-graphite.NewTestServer
	/home/yatiohi/go/src/github.com/cyberdelia/go-metrics-graphite/graphite_test.go:44 +0x202
FAIL	github.com/cyberdelia/go-metrics-graphite	8.038s

Reuse the TCP connection

In some instances, we connect to Graphite servers in remote datacenters, and TCP connections can take upwards of 1 second to be established.

Reuse the TCP connection to cut down on waste of tearing down and setting up the connection every time we publish metrics.

I can try to work on this at some point, just wanted to record it while it's fresh in my mind and so I can have a link to bookmark.

[Question]: Status of the project

Hi,

While refreshing dependencies for nebula in Guix, I've faced with this project,
which looks like dormant.

If it's still maintained, may the current maintainer add release or versioned tag
please? go.mod is also quite common for Golang projects.

Thanks,
Oleg

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.