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

Histograms: require buckets to be explicit #27

Merged
merged 1 commit into from
Jan 9, 2020

Conversation

colega
Copy link
Contributor

@colega colega commented Jan 9, 2020

Default buckets were removed and buckets are now required: writing the buckets is a 5 second effort while forgetting about them and having wrong buckets in production is a lot of work (and maybe even an incident if wrong buckets don't provide enough visibility on an issue)

So now any code without buckets on the histograms will fail to intialize that metrics.

Finally, empty buckets tag is now allowed and it builds an empty buckets slice, which will cause prometheus library to use its own default buckets.

Notice that this change identified an issue in one of our own tests where buckets tag was wrong (metricsbuckets) and it was unnoticed because default buckets where used instead.

Solves https://github.com/cabify/gotoprom/issues/23

@colega colega requested a review from mapno January 9, 2020 13:28
Default buckets were removed and buckets are now required: writing the
buckets is a 5 second effort while forgetting about them and having
wrong buckets in production is a lot of work (and maybe even an incident
if wrong buckets don't provide enough visibility on an issue)

So now any code without buckets on the histograms will fail to intialize
that metrics.

Finally, empty buckets tag is now allowed and it builds an empty buckets
slice, which will cause prometheus library to use its own default
buckets.

Notice that this change identified an issue in one of our own tests
where buckets tag was wrong (`metricsbuckets`) and it was unnoticed
because default buckets where used instead.
@colega colega force-pushed the colega/remove-default-buckets branch from 553f04c to a33793f Compare January 9, 2020 13:33
@colega colega merged commit 0c15a0b into master Jan 9, 2020
@colega colega deleted the colega/remove-default-buckets branch January 9, 2020 13:42
colega added a commit that referenced this pull request Jan 9, 2020
Just like #27 for Histograms,
summaries now should be built with explicit objectives or their building
will fail.
colega added a commit that referenced this pull request Jan 9, 2020
Just like #27 but for Summaries,
same reasons apply, TL;DR: explicit is better than implicit.

Also fixed summary builder not failing when objectives were malformed.
colega added a commit that referenced this pull request Jan 9, 2020
Just like #27 but for Summaries,
same reasons apply, TL;DR: explicit is better than implicit.

Also fixed summary builder not failing when objectives were malformed.
colega added a commit that referenced this pull request Jan 9, 2020
Just like #27 but for Summaries,
same reasons apply, TL;DR: explicit is better than implicit.

Also fixed summary builder not failing when objectives were malformed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants