-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Refactor healthcheck signalling between server and service #5308
Refactor healthcheck signalling between server and service #5308
Conversation
Simplifies the signalling of healthcheck status from the "servers" to the "service": instead of using 2 channels to feed healthcheck status back to the Service.HealthCheck, we just give the server components direct access to the Healthcheck which they can update directly. This is possible because the Healthcheck package is threadsafe (uses `atomic.Value` for state). This pattern is consisten with how the service's Healtcheck is passed directly to cmd/collector/app package. closes jaegertracing#5307 Signed-off-by: Will Sewell <willsewell@monzo.com>
@@ -48,23 +48,23 @@ import ( | |||
// Server runs HTTP, Mux and a grpc server | |||
type Server struct { | |||
logger *zap.Logger | |||
healthCheck *healthcheck.HealthCheck |
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 felt like this was nicer ordering because this felt related to the logger to me since they both come from the service and are both related to "reporting status".
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5308 +/- ##
==========================================
- Coverage 95.09% 95.06% -0.04%
==========================================
Files 340 340
Lines 16626 16612 -14
==========================================
- Hits 15811 15792 -19
- Misses 628 631 +3
- Partials 187 189 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Which problem is this PR solving?
Resolves #5307
Description of the changes
atomic.Value
for state).How was this change tested?
make lint test
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test