Integration for using the Spring Framework to manage an Orbit Cluster.
Orbit Spring provides autoconfigured contributors to the Spring Boot Actuator endpoints, which activate if Spring Boot Actuator is found in your project classpath. Spring Boot Actuator is an optional dependency of Orbit Spring.
The OrbitHealthIndicator is a HealthIndicator which contributes a health status of "UP" if the Stage is running and the local node is alive. The health details are listed under the key "orbit" in the health endpoint.
{
"status": "UP",
"orbit": {
"status": "UP",
"state": "RUNNING",
"alive": true
}
}
The ActorInfoContributorLifetimeExtension is an InfoContributor which aggregates info from Actor implementation classes that implement the InfoContributor interface. The actors' info is listed under the key "actors" in the info endpoint.
Suppose we have an actor defined as follows:
public class MyActorImpl extends AbstractActor implements MyActor, InfoContributor {
@Override
public void contribute(final Info.Builder builder) {
builder.withDetail("status", state().getStatus());
}
...
}
If we activate two instances with identities "a" and "b", we might see this response from the info
endpoint:
{
"actors": {
"MyActor": {
"a": {
"status": {
"foo": false,
"bar": 0
}
},
"b": {
"status": {
"foo": true,
"bar": 42
}
}
}
}
}
By default, actor info is grouped primarily by the actor interface, and secondarily by the actor identity. This is customizable by setting the properties:
management.info.actors.group.primary: NONE | INTERFACE | IDENTITY
management.info.actors.group.secondary: NONE | INTERFACE | IDENTITY
This project was developed by Electronic Arts and is licensed under the BSD 3-Clause License.