cyberdelia / go-metrics-graphite Goto Github PK
View Code? Open in Web Editor NEWGraphite client for the go-metrics
License: BSD 2-Clause "Simplified" License
Graphite client for the go-metrics
License: BSD 2-Clause "Simplified" License
Unlike statsd, it looks like counter does not reset on every flush.
Is this expected?
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
It would be nice to be able to stop the service.
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?
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
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.