Skip to content

Commit

Permalink
Remove metrics from client
Browse files Browse the repository at this point in the history
  • Loading branch information
iknite committed Mar 14, 2019
1 parent bc7e488 commit b9debac
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
8 changes: 0 additions & 8 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"github.com/bbva/qed/balloon"
"github.com/bbva/qed/hashing"
"github.com/bbva/qed/log"
"github.com/bbva/qed/metrics"
"github.com/bbva/qed/protocol"
)

Expand Down Expand Up @@ -212,7 +211,6 @@ func (c HTTPClient) Ping() error {
// Add will do a request to the server with a post data to store a new event.
func (c *HTTPClient) Add(event string) (*protocol.Snapshot, error) {

metrics.ClientEventAdd.Inc()
data, _ := json.Marshal(&protocol.Event{Event: []byte(event)})

body, err := c.doReq("POST", "/events", data)
Expand All @@ -230,8 +228,6 @@ func (c *HTTPClient) Add(event string) (*protocol.Snapshot, error) {
// Membership will ask for a Proof to the server.
func (c *HTTPClient) Membership(key []byte, version uint64) (*protocol.MembershipResult, error) {

metrics.ClientQueryMembership.Inc()

query, _ := json.Marshal(&protocol.MembershipQuery{
Key: key,
Version: version,
Expand All @@ -252,8 +248,6 @@ func (c *HTTPClient) Membership(key []byte, version uint64) (*protocol.Membershi
// Membership will ask for a Proof to the server.
func (c *HTTPClient) MembershipDigest(keyDigest hashing.Digest, version uint64) (*protocol.MembershipResult, error) {

metrics.ClientQueryMembership.Inc()

query, _ := json.Marshal(&protocol.MembershipDigest{
KeyDigest: keyDigest,
Version: version,
Expand All @@ -274,8 +268,6 @@ func (c *HTTPClient) MembershipDigest(keyDigest hashing.Digest, version uint64)
// Incremental will ask for an IncrementalProof to the server.
func (c *HTTPClient) Incremental(start, end uint64) (*protocol.IncrementalResponse, error) {

metrics.ClientQueryIncremental.Inc()

query, _ := json.Marshal(&protocol.IncrementalRequest{
Start: start,
End: end,
Expand Down
25 changes: 0 additions & 25 deletions metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,6 @@ var (
},
)

// Client

ClientEventAdd = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "client_event_add",
Help: "Number of events added into the cluster.",
},
)
ClientQueryMembership = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "client_query_membership",
Help: "Number of single events directly verified into the cluster.",
},
)
ClientQueryIncremental = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "client_query_incremental",
Help: "Number of range of verified events queried into the cluster.",
},
)

// PROMETHEUS

metricsList = []prometheus.Collector{
Expand All @@ -190,10 +169,6 @@ var (

QedSenderInstancesCount,
QedSenderBatchesSentTotal,

ClientEventAdd,
ClientQueryMembership,
ClientQueryIncremental,
}

registerMetrics sync.Once
Expand Down

0 comments on commit b9debac

Please sign in to comment.