Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added telemetry around Catalog APIs #3765

Merged
merged 4 commits into from
Jan 5, 2018
Merged

Added telemetry around Catalog APIs #3765

merged 4 commits into from
Jan 5, 2018

Conversation

diptanu
Copy link
Contributor

@diptanu diptanu commented Dec 21, 2017

Adding some metrics to indicate the rate of Catalog requests, and RPC failures. These metrics are useful for operators to understand the health of Consul from the perspective of the users.

cc/ @slackpad I didn't add support for labels. Is Consul doing tagged metrics like Nomad these days?

An example -

{
   Name: "consul.client.api.success.catalog_list_services",
   Count: 5,
   Sum: 5, 
   Min: 1,
   Max: 1,
   Mean: 1,
   Stddev: 0,
   Labels: {
        "node": "node-name"
   }
},

Copy link
Contributor

@slackpad slackpad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @diptanu this is looking good.

Is Consul doing tagged metrics like Nomad these days?

We do support labels and this is a good place to probably add some additional info.

@@ -171,10 +189,12 @@ func (s *HTTPServer) CatalogServiceNodes(resp http.ResponseWriter, req *http.Req
s.ServiceTags = make([]string, 0)
}
}
metrics.IncrCounter([]string{"client", "api", "errors", "catalog_service_nodes"}, 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be error to be consistent.

@diptanu
Copy link
Contributor Author

diptanu commented Dec 22, 2017

@slackpad All done! Added the node name as a label, so operators would be able to group the API errors/success/rates by nodes. Let me know if you need anything else here?

@slackpad slackpad merged commit 10ff52c into hashicorp:master Jan 5, 2018
@slackpad
Copy link
Contributor

slackpad commented Jan 5, 2018

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants