-
Notifications
You must be signed in to change notification settings - Fork 339
(refactor) UpDownCounter RAII guards #8379
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d37b0ff
(refactor) Make updown counters use RAII to always call down on their…
872c2d6
(refactor) Convert apollo.router.session.count.active from gauge to u…
9c0b16e
(refactor) Convert pipeline and connection handles to use up down cou…
fcdd0e8
(refactor) Create integration tests for metrics
a01f83b
(docs) Changeset
697859e
(fix) Drive by, fix prom initialization logging
d61025d
(fix) Lifecycle tests need to be more lenient
e1430e1
(fix) Prometheus metrics have a 1 in 10 chance for reload
8ee2a1b
(refactor) Remove unused pipeline instruments as these are now handle…
701e24b
(lint) Remove left over comment
902b633
Add mut_use to updown counter guard
c1b06cb
Add explanation for non-caching arm if logic
33b3b71
(refactory) Remove ActiveComputeMetric
b178c50
(refactor) Clean up guarded imports
7cb526e
(refactor) make multi pipelines more lenient as there may be a metric…
9538a75
(refactor) make multi pipelines more lenient as there may be a metric…
e2285e4
(refactor) force prometheus metric reload every 20 reloads
c934c2e
(refactor) Make prom not reload on first reload
dc36be3
(test) Make tests less lenient again
c645147
(test) Make tests less lenient again
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ### (refactor) UpDownCounter RAII guards ([PR #8379](https://github.com/apollographql/router/pull/8379)) | ||
|
|
||
| Previously UpDownCounters were being manually incremented and decremented. This PR changes UpDownCounters to use RAII guards | ||
| on drop ensuring that they are always decremented when dropped. | ||
|
|
||
| In particular this fixes: `apollo.router.opened.subscriptions` which was previously drifting due to manual incrementing and decrementing. | ||
|
|
||
| By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/8379 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.