Skip to content

Commit

Permalink
Expose own metrics in /metrics/peer/ (#754)
Browse files Browse the repository at this point in the history
Rationaly here is that any metric scraper should support be configured in the
same way regardless of the peer. By skipping a handler for the current peer we
are creating an "exception" unique to every peer, which only makes things more
difficult to maintain on infra-side of things.

Also, chances are the index mapping is somehow borked, since in my tests it is
sometimes skipping the current node and sometimes a different node, so this might
fix that altogether.
  • Loading branch information
hsanjuan committed Sep 28, 2020
1 parent 8c2ee78 commit d9782a2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions core/drand_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ func (d *Drand) PeerMetrics(c context.Context) (map[string]http.Handler, error)
handlers := make(map[string]http.Handler)
var err error
for _, n := range d.group.Nodes {
if n.Index == uint32(d.index) {
continue
}
p := net.CreatePeer(n.Address(), n.IsTLS())
if h, e := hc.HandleHTTP(p); e == nil {
handlers[n.Address()] = h
Expand Down

0 comments on commit d9782a2

Please sign in to comment.