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
fix: Cleanly shutdown the Telemetry plugin. #848
Conversation
fixes #847 The telemetry plugin would cause the router to hang if ServiceBuilder::build() failed. This commit makes sure the Telemetry plugin is cleanly shutdown when it's the case, thus correctly erroring out instead of hanging.
✅ Deploy Preview for apollo-router-docs canceled.
|
@@ -308,6 +309,20 @@ impl Plugin for Telemetry { | |||
} | |||
} | |||
|
|||
impl Drop for Telemetry { | |||
fn drop(&mut self) { | |||
// This allows us to make sure the telemetry related globals |
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.
Gut feeling is that this will activate even if it was not supposed to, which would make this incorrect.
Let's talk this through.
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 confident about this, let's talk it through before merging.
Closing as #849 got merged |
fixes #847
The telemetry plugin would cause the router to hang if ServiceBuilder::build() failed.
This commit makes sure the Telemetry plugin is cleanly shutdown when it's the case, thus correctly erroring out instead of hanging.