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

emit counter metric on soft/hard limit breached #892

Merged
merged 4 commits into from
Oct 26, 2019

Conversation

jschaul
Copy link
Member

@jschaul jschaul commented Oct 24, 2019

(I wonder actually whether runWithBudget could not be within the Gundeck Monad, so as not to need to pass metrics around, but maybe that's another discussion. There is no MonadMetrics, is there?)

This PR can be (adapted if needed) and merged by the reviewer.

@fisx fisx force-pushed the feature/gundeck-more-metrics branch from 2c8d767 to cda229f Compare October 25, 2019 08:21
oldsize
let softLimitBreached = (maybe False (oldsize >=) (limits ^. limitSoft))
hardLimitBreached = (maybe False (oldsize >=) (limits ^. limitHard))
warnNoBudget softLimitBreached hardLimitBreached oldsize
Copy link
Contributor

Choose a reason for hiding this comment

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

this is better. thanks!

@fisx
Copy link
Contributor

fisx commented Oct 25, 2019

(I wonder actually whether runWithBudget could not be within the Gundeck Monad, so as not to need to pass metrics around, but maybe that's another discussion. There is no MonadMetrics, is there?)

I wouldn't bother to change anything now, but if I would, it'd be something like this:

data LimitKind = Hard | Soft

class MonadThreadBudgetReport m where
    reportLimitBreached :: MaxConcurrentNativePushes -> LimitKind -> Int -> m ()

That would make it straight-forward to make this a stand-alone package (except maybe for the Options stuff).

Also note 3d6229e

@fisx fisx merged commit a6ed328 into develop Oct 26, 2019
@fisx fisx deleted the feature/gundeck-more-metrics branch October 26, 2019 22:37
jschaul added a commit that referenced this pull request Nov 6, 2019
- New configuration options available (none mandatory). See #895 #900 #869

- Support HEAD requests for `/sso/initiate-bind` (#878)

- Do not send conversation delete events to team members upon team deletion (#897)
- Support SNI for bot registrations (by bumping http-client version) (#899)

- Make gundeck handle AWS outages better. (#869, #890, #892)
- Improve performance by avoiding unbounded intra-service traffic spikes on team deletions (#900)
- Add optional native push connection throttling (#895)
- New backoffice/stern endpoint (#896)
- SAML: Store raw idp metadata with typed details in c* (#872)
- documentation/script updates
jschaul added a commit that referenced this pull request Nov 6, 2019
- New configuration options available (none mandatory). See #895 #900 #869

- Support HEAD requests for `/sso/initiate-bind` (#878)

- Do not send conversation delete events to team members upon team deletion (#897)
- Support SNI for bot registrations (by bumping http-client version) (#899)

- Make gundeck handle AWS outages better. (#869, #890, #892)
- Improve performance by avoiding unbounded intra-service traffic spikes on team deletions (#900)
- Add optional native push connection throttling (#895)
- New backoffice/stern endpoint (#896)
- SAML: Store raw idp metadata with typed details in c* (#872)
- documentation/script updates
@jschaul jschaul mentioned this pull request Nov 6, 2019
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