-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Gather metrics from sinks #148
Conversation
Perhaps another label could be used to help differentiate the |
@digitalsadhu Good point. I've now made it so that there is a |
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
# [1.1.0](v1.0.4...v1.1.0) (2020-07-07) ### Features * Gather metrics from sinks ([#148](#148)) ([7d1792c](7d1792c))
🎉 This PR is included in version 1.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This adds metrics to the internal sinks. These metrics ups a counter for each method in the sink where the method is set as a label on the counter. If the value to the arguments passed to the method is not valid or a directory traversal is tried, the counter will have a
success
label set tofalse
. If the method touches the storage, thesuccess
label will be set totrue
.Do note that if writing to the storage fails (ex a permission is not granted etc), the metric will have
success
set totrue
. This is because we would like to distinguish between touching the file storage (success
istrue
) and when we are not touching the file storage (success
isfalse
). These are handy to distinguish on when writing / reading to cloud storages where one pay for access operations.