-
Couldn't load subscription status.
- Fork 41.6k
Description
In some cases I would like to add a map of details when using Health.Builder. Currently the builder class only allows for adding details one at a time after object construction, and it would be helpful if I could add an entire map of details, some thing like:
Health.Builder health = Health.unknown();
Map<String, Object> details = ...; // grab a map of details from somewhere
health.withDetails(details);
I assume the new withDetails(Map<String, Object>) method could just delegate to Map.putAll(Map<String, Object>) under the hood, and the semantics of overwriting existing keys is the same as if I called withDetail(String, Object) multiple times.
A lot of my health indicators pull multiple maps from other sources, so I'd rather not have to combine them into a single map that is known prior to the creation of the Health object.
I'm happy to submit a PR for this if it helps.