Skip to content

Commit

Permalink
Change go-metrics-graphit to our own fork (#106)
Browse files Browse the repository at this point in the history
Original go-metrics-graphite is no longer maintained so we created our
own fork with critical fixes.
  • Loading branch information
medzin authored Apr 4, 2018
1 parent 9335d16 commit 9450d6c
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 38 deletions.
12 changes: 6 additions & 6 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
name = "github.com/rcrowley/go-metrics"
revision = "1f30fe9094a513ce4c700b9a54458bbb0c96996c"

[[constraint]]
name = "github.com/cyberdelia/go-metrics-graphite"
revision = "39f87cc3b432bbb898d7c643c0e93cac2bc865ad"

[[constraint]]
name = "github.com/go-logfmt/logfmt"
version = "0.3.0"

[[constraint]]
branch = "master"
name = "golang.org/x/time"

[[constraint]]
name = "github.com/allegro/go-metrics-graphite"
revision = "d8aec135f2c1e2d0fd86f55e9b85427ba6592490"
6 changes: 3 additions & 3 deletions metrics/graphite.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"time"

"github.com/cyberdelia/go-metrics-graphite"
"github.com/allegro/go-metrics-graphite"
"github.com/kelseyhightower/envconfig"
"github.com/rcrowley/go-metrics"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -47,8 +47,8 @@ type GraphiteConfig struct {
// SetupGraphite will configure metric system to periodically send metrics to
// Graphite.
func SetupGraphite(cfg GraphiteConfig) error {
addr, err := net.ResolveTCPAddr("tcp", fmt.Sprintf("%s:%d", cfg.Host, cfg.Port))
if err != nil {
addr := fmt.Sprintf("%s:%d", cfg.Host, cfg.Port)
if _, err := net.ResolveTCPAddr("tcp", addr); err != nil {
return fmt.Errorf("invalid Graphite address: %s", err)
}
go graphite.Graphite(metrics.DefaultRegistry, time.Minute, buildUniquePrefix(cfg.Prefix), addr)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9450d6c

Please sign in to comment.