-
Notifications
You must be signed in to change notification settings - Fork 330
refactor: Only reload telemetry when needed #8328
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 all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
dccc21b
Implement PartialEq for exporter config
33d9170
Move activation into lifecycle.rs
bbcb396
Remove Option when setting a meter provider on Aggregate meter provider.
4923eb0
Initialization rework
1eacd98
Renames and move stuff around
6faaab8
Clippy
96e5fc9
Move creation of logging layer into builder and apply during activation
323cf7e
Make propagation reload uniform
f4c5269
Move stuff around
316cd3b
Fix change detection for apollo trace exporting
cc970f0
Move TracingConfigurator
520c4e8
Move prometheus logging
300abcf
Fix shutdown test
21ed7ca
Fix apollo metrics config
116a5f7
Fix some tests, but there are still some failures
9a51f05
Prevent schema reload from choosing a different port for prom
6039eb5
Wait a little longer for metrics
93ab64e
Changelog
f65de82
Move view logic to builder
78f3706
Add test for metrics reloading to show that reloads don't always happen
3ab26e9
Add some unit testing for the reload functionality
b882be9
Improve logging
2e990e4
Improve logic around spawning a blocking safe task.
dd037c4
Use block_in_place during configuration just to be safe.
984c233
Merge branch 'dev' into bryn/otel-reload-simplification
6ddfce9
Add tracing reload test
f5d684d
Update apollo-router/src/metrics/aggregation.rs
BrynCooke 1feb276
(refactor) create_registered_instrument logic moved to inner
6f72675
(docs) Clarify activation fields
b25b296
(refactor) Remove unused fns and convert others to test
c77255a
(refactor) Rename fields in activation
a7d51c6
(refactor) Rename boolean fns with is_ prefix
1cb9e12
(docs) deadlock explaination
31d9956
(refactor) Renames based on sync review
9f26ac4
(docs) Code comments and docs
3faef4f
Lints
469a12a
Use spawn_blocking instead of block in place to prevent blocking relo…
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
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 @@ | ||
| ### Only reload telemetry when needed ([PR #8328](https://github.com/apollographql/router/pull/8328)) | ||
|
|
||
| Previously when schema or config reload took place telemetry would always be reloaded. This would drop existing exporters | ||
| and create new ones. | ||
|
|
||
| Telemetry exporters will now only be recreated if relevant configuration has changed. | ||
|
|
||
| By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/8328 |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I fully understand the change to a vec? easier to iterate over?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have converted the code to always expect something for every meter provider type. Hashmap would allow the slot to be empty which adds a layer of complexity. Now we just have a fixed set of meter providers always.