Support map return type for metrics use case