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

remove telemetry configuration hot reloading #1463

Merged
merged 23 commits into from
Aug 12, 2022
Merged

Conversation

Geal
Copy link
Contributor

@Geal Geal commented Aug 4, 2022

Fix #1224

Configuration hot reloading is not very useful for telemetry, and is the
source of regular bugs that are hard to fix.

This removes the support for configuration reloading entirely. Now, the
router will reject a configuration reload with an error log if the
telemetry configuration changed.

A temporary tracing subscriber is created when the router is started, and
is used until a subscriber can be created from the configuration and set
as global subscriber. That global subscriber will then be used for all
the requests and will not change for the entire life of the process.

Configuration hot reloading is not very useful for telemetry, and is the
source of regular bugs that are hard to fix.

This removes the support for configuration reloading entirely. Now, the
router will reject a configuration reload with an error log if the
telemetry configuration changed.

A temporary tracing subscriber is created when the router is started, and
is used until a subscriber can be created from the configuration and set
as global subscriber. That global subscriber will then be used for all
the requests and will not change for the entire life of the process.
@github-actions

This comment has been minimized.

Geoffroy Couprie added 4 commits August 5, 2022 16:35
When using the router as a library (example: in integration tests), we
might want to use another tracing subscriber than the one created by
default in the telemetry plugin.

This adds a method to the telemetry plugin to directly provide a
subscriber. It will then be modified to use layers for the telemetry
exporters and spaceport, so it won't be possible to deactivate studio
reportingt that way
@Geal Geal requested review from garypen and SimonSapin August 5, 2022 16:07
@Geal Geal marked this pull request as ready for review August 5, 2022 16:07
@Geal Geal requested review from bnjjj and removed request for garypen August 8, 2022 08:32
apollo-router/src/configuration/mod.rs Outdated Show resolved Hide resolved
apollo-router/src/plugins/telemetry/mod.rs Show resolved Hide resolved
apollo-router/src/plugins/telemetry/mod.rs Outdated Show resolved Hide resolved
apollo-router/src/plugins/telemetry/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@SimonSapin SimonSapin left a comment

Choose a reason for hiding this comment

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

Please also remove this comment paragraph in router.rs

This must only be called in the context of Executable::builder() because it relies on custom logging setup to support hot reload.

apollo-router/src/plugins/telemetry/mod.rs Outdated Show resolved Hide resolved
apollo-router/src/plugins/telemetry/mod.rs Show resolved Hide resolved
apollo-router/src/plugins/telemetry/mod.rs Show resolved Hide resolved
apollo-router/src/plugins/telemetry/mod.rs Show resolved Hide resolved
@Geal Geal requested review from bnjjj, BrynCooke and SimonSapin August 11, 2022 10:30
@SimonSapin
Copy link
Contributor

Looks like licenses.html needs an update (again)

Copy link
Contributor

@o0Ignition0o o0Ignition0o left a comment

Choose a reason for hiding this comment

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

One big concern about the telemetry unpinning.
The rest looks good to me

apollo-router/Cargo.toml Outdated Show resolved Hide resolved
apollo-router/src/executable.rs Outdated Show resolved Hide resolved
@Geal Geal requested a review from o0Ignition0o August 12, 2022 08:48
@Geal Geal merged commit be65908 into main Aug 12, 2022
@Geal Geal deleted the geal/remove-telemetry-reloading branch August 12, 2022 09:05
@Geal Geal mentioned this pull request Aug 22, 2022
@Geal Geal self-assigned this Aug 24, 2022
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.

Revisit the tracing reload code before 1.0
5 participants