This repository has been archived by the owner on Aug 6, 2021. It is now read-only.
allow a global gauge not specific to a host #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the metrics include the host in the key. I needed to record a gauge like 'number of active queues' which is not specific to a host (e.g. https://github.com/sharelatex/project-history-sharelatex/blob/bc4337c1fd44e7c2c5b44ecb676ab904f8f365ed/app/coffee/ErrorRecorder.coffee#L55)
I thought I would be able to access the most recent value across a set of hosts using graphite functions but it's not possible (because gauges always have a value, so there is no concept of the most recent data point across a set).
This changes add a
globalGauge
metric which records the same data isgauge
but with a key ofservice.global.foo' instead of
service.hostname.foo`.