structured logging: refactor logic of MonitoredResourceUtil#getValue() to avoid long switch #710
Labels
api: logging
Issues related to the googleapis/java-logging API.
lang: java
Issues specific to Java.
type: cleanup
An internal cleanup or hygiene concern.
Current implementation (see #685) of MonitoredResourceUtil#getValue() is hard to maintain or understand. The code should be refactored, so each label is built in the designated function.
One of possible approaches would be using a visitor pattern.
Such change will simplify further maintenance (e.g. adding new labels) as well as exposing this functionality for external use.
The text was updated successfully, but these errors were encountered: