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

[#1964] Include AxonServerHealthIndicator #2130

Merged
merged 8 commits into from
Mar 14, 2022
Merged

[#1964] Include AxonServerHealthIndicator #2130

merged 8 commits into from
Mar 14, 2022

Conversation

smcvb
Copy link
Member

@smcvb smcvb commented Mar 9, 2022

This pull request introduces the AxonServerHealthIndicator, adding the axonServer component when investigating /actuator/health (with the right credentials).

This Spring Boot Actuator HealthIndicator shares whether the contexts an Axon Framework application is connected with are active.
It does so by requesting the available connections from the AxonServerConnectionManager.

When all connections are active, the UP status is shared.
When all connections are inactive, the DOWN status is projected.
When one of the connections is inactive, the custom WARN status is shown.
This approach is in line with what Axon Server's local health indicator shows.

Next to the status, details are provided about the separate connection's activity.
These can be found under {context-name}.connection.active.

This pull request resolves #1964

Expose the connection of the AxonServerConnectionManager through the
ConnectionManager interface

#1964
Introduce an AxonServer health indicator by implementing the
AbstractHealthIndicator. It should add the connectivity of the existing
contexts within the AxonServerConnectionManager through the Health
.Builder

#1964
Introduce an autoconfiguration class constructing an
AxonServerHealthIndicator bean if actuator is present on the classpath

#1964
Add tests for the AxonServerConnectionManager
Add tests for the AxonServerHealthIndicator
Add tests for the AxonServerActuatorAutoConfiguration

#1964
Fix the broken spring boot tests by ignoring the new
AxonServerActuatorAutoConfiguration either by excluding it or through
the axonserver.enabled=false property

#1964
Adjust the AxonServerHealthIndicator to share a status field as well.
This status field should include the additional status "WARN" for when
one of the contexts the app is connected with, is down. To support this
thoroughly, a StatusAggregate should be included.

#1964
@smcvb smcvb added Type: Feature Use to signal an issue is completely new to the project. Priority 3: Could Low priority. Issues that are nice to have but have a straightforward workaround. Status: In Progress Use to signal this issue is actively worked on. labels Mar 9, 2022
@smcvb smcvb added this to the Release 4.6.0 milestone Mar 9, 2022
@smcvb smcvb self-assigned this Mar 9, 2022
- Add private constructor for the utility class HealthStatus
- Check for nullability of the connectionStatus boxed boolean

#1964
@sonarcloud
Copy link

sonarcloud bot commented Mar 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

96.9% 96.9% Coverage
0.0% 0.0% Duplication

@smcvb smcvb merged commit e635fc6 into master Mar 14, 2022
@smcvb smcvb deleted the feature/1964 branch March 14, 2022 09:28
@smcvb smcvb added Status: Resolved Use to signal that work on this issue is done. and removed Status: In Progress Use to signal this issue is actively worked on. labels Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 3: Could Low priority. Issues that are nice to have but have a straightforward workaround. Status: Resolved Use to signal that work on this issue is done. Type: Feature Use to signal an issue is completely new to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an actuator health indicator to check the connection between the application and Axon Server
3 participants