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

Rework Scope metrics according to Prometheus conventions. #1615

Merged
merged 2 commits into from
Jun 30, 2016

Conversation

juliusv
Copy link
Contributor

@juliusv juliusv commented Jun 29, 2016

  • counters should end with _total
  • elaborated and added units to help strings
  • recommended for cache hit/miss metrics: track only the total and the
    hits and in separate metrics, since the most common query will be
    "hits / total"
  • track all times in seconds (base units), which has become the standard
    recommendation
  • other small changes

There could be more changes that would require more thinking (what
dimensions to use, summaries vs. histograms, etc.), but this is probably
enough controversial material already :)

- counters should end with _total
- elaborated and added units to help strings
- recommended for cache hit/miss metrics: track only the total and the
  hits and in separate metrics, since the most common query will be
  "hits / total"
- track all times in seconds (base units), which has become the standard
  recommendation
- other small changes

There could be more changes that would require more thinking (what
dimensions to use, summaries vs. histograms, etc.), but this is probably
enough controversial material already :)
@juliusv
Copy link
Contributor Author

juliusv commented Jun 29, 2016

@tomwilkie

@tomwilkie
Copy link
Contributor

Can you update sqs_control_router.go to use timeRequestStatus? Or would you mind if I do?

Will also need to redo our dashboards in a separate PR.

@juliusv
Copy link
Contributor Author

juliusv commented Jun 29, 2016

Will do!

@juliusv
Copy link
Contributor Author

juliusv commented Jun 29, 2016

Did that and fixed a bug in an existing metric (please double check):

sqsRequestDuration.WithLabelValues("GetQueueUrl", "500").Observe(float64(duration.Nanoseconds()))
was reusing both a duration and method string from an Observe() call above.

@tomwilkie
Copy link
Contributor

Nice catch!

@tomwilkie tomwilkie merged commit 4fa40e2 into master Jun 30, 2016
@tomwilkie tomwilkie deleted the rework-metrics branch June 30, 2016 08:12
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