-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add notification metrics #2522
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
Add notification metrics #2522
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2522 +/- ##
=========================================
+ Coverage 60.45% 60.5% +0.04%
=========================================
Files 102 102
Lines 8001 8011 +10
=========================================
+ Hits 4837 4847 +10
Misses 2517 2517
Partials 647 647
Continue to review full report at Codecov.
|
Same as the other PR. Thanks. |
metrics/prometheus.go
Outdated
@@ -10,4 +10,7 @@ const ( | |||
var ( | |||
// StorageNamespace is the prometheus namespace of blob/cache related operations | |||
StorageNamespace = metrics.NewNamespace(NamespacePrefix, "storage", nil) | |||
|
|||
// NotificationNamespace is the prometheus namespace of notification related metrics | |||
NotificationNamespace = metrics.NewNamespace(NamespacePrefix, "notification", nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pluralize this as notifications
.
0dfd56e
to
636c645
Compare
An sample output is:
|
@stevvooe any chance to take a look at this? would be great to have this change in. |
@tifayuki Could you add endpoint label also to this PR? |
Please sign your commits following these rules: $ git clone -b "notification_metrics" git@github.com:tifayuki/distribution.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354473512
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
0eb92cb
to
e2f0f57
Compare
@manishtomar I added the endpoint label. Can you take a look at it? |
@tifayuki Thanks! Code LGTM. Could you merge latest master and push it? I wonder if it will fix travis build. |
78ec108
to
99ce26e
Compare
9f514b8
to
a3d6f72
Compare
@manishtomar
Any idea what error it is? |
@dmp42 Would you know why this is failing? The error is coming for not-recent commit. Should one squash into commit to fix it? |
@tifayuki can you rebase on master and see if the build still fails? |
a3d6f72
to
5c66b57
Compare
@mrueg it worked |
@dmcgowan any chance to get this in for 2.7.1? |
@dmcgowan I added this in 2.7.2 milestone. Any chance this can be merged? |
LGTM If you are going to open up a backport to 2.7 for this, please provide strong justification and show how it is not impactful for compatibility. Such a change in a patch release is very irregular, but I understand there is no 2.8 currently on the horizon. |
Can you squash this before merging? Will make cherry-picking cleaner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tifayuki Sorry I just realized the mistake in the code. It is incrementing by 1 instead of len(events)
. Can you please address the mistake and put it up for review again?
It does not impact compatibility. I originally wanted it in 2.7 release as this change is being used in Hub registry but missed the train. I thought we could get it in 2.7.1|2 release but I that was assuming that 2.7.x release will be based on master branch which is incorrect. Hence, please ignore my request to put this change in patch release. It can go in next release. I just wanted to get this merged. Also I apologize I just realized a mistake when looking at the code and have requested these. We can merge it after @tifayuki makes those changes. Thanks for your time! |
@tifayuki Thanks for the changes. However build is failing due to unsigned commits which was GH fault when accepting the suggestion. Could you please rebase with one signed commit? Also, you will need to put |
It adds notification related prometheus metrics, including: - total count for events/success/failure/error - total count for notification per each status code - gauge of the pending notification queue Signed-off-by: tifayuki <tifayuki@gmail.com>
Signed-off-by: Honglin Feng <tifayuki@gmail.com>
Signed-off-by: Honglin Feng <tifayuki@gmail.com>
Signed-off-by: Honglin Feng <tifayuki@gmail.com>
e1663b8
to
b0c2c80
Compare
Signed-off-by: Honglin Feng <tifayuki@gmail.com>
b0c2c80
to
d5a615b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a comment. Thanks a lot for this.
Signed-off-by: Honglin Feng <tifayuki@gmail.com>
@dmcgowan Can this be merged now please? |
do we want some of the commits to be squashed before merging? |
@tifayuki Can you please squash commits? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@caervs Can you please merge this? |
It adds notification related prometheus metrics, including:
Signed-off-by: tifayuki tifayuki@gmail.com