Skip to content

Sliding windows for summaries - #229

Merged
siimon merged 6 commits into
prometheus:masterfrom
BonnierNews:master
Nov 13, 2018
Merged

siimon merged 6 commits into
prometheus:masterfrom
BonnierNews:master

Conversation

@carsotho

@carsotho carsotho commented Nov 5, 2018

Copy link
Copy Markdown
Contributor

Resolves #205. Feedback is welcome!

@siimon

siimon commented Nov 6, 2018

Copy link
Copy Markdown
Contributor

Thanks for this! I will try and have a look at this today!

@siimon
siimon requested a review from SimenB November 6, 2018 11:43

@siimon siimon left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me except a small backwards compability thing! However I think it would be great to document this especially what the maxAgeSeconds and the ageBuckets do.

Also an update to the changelog would be great :)

Comment thread lib/summary.js Outdated

validateInput(config.name, config.help, config.labelNames);

this.maxAgeSeconds = config.maxAgeSeconds || 600;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a breaking change, altering the current behaviour. Could the defaults be changed so it doesn't change the current behaviour?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should be able to do that but as described in the issue and by the prometheus docs a summary should be implemented with a sliding window. And we could always release this as a major bump.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's great but it's still a breaking change and I want to avoid them as much as possible if it's doable (which I think it is in this case)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I get your point but I don't think it's worth a breaking change for this, however I think for the next major bump we probably should change the default to the sliding window instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Alright I'll fix it :)

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