<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->

- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.

## Describe the proposal
<!-- Please use this for a concrete design proposal for functionality. -->
<!-- If you just want to request a new feature and discuss the possible business value, create a Feature Request. -->

@wxbty PTAL
* This method should no longer use and will be deleted in the future.
     */
    @Deprecated
    protected void appendMetricsCompatible(Map<String, String> map) {
        MetricsConfig metricsConfig = getConfigManager().getMetrics().orElse(null);
        if (metricsConfig != null) {
            if (metricsConfig.getProtocol() != null && !StringUtils.isEquals(metricsConfig.getProtocol(), PROTOCOL_PROMETHEUS)) {
                Assert.notEmptyString(metricsConfig.getPort(), "Metrics port cannot be null");
                map.put("metrics.protocol", metricsConfig.getProtocol());
                map.put("metrics.port", metricsConfig.getPort());
            }
        }
    }
    /**
     * To obtain the method list in the port, use reflection when in native mode and javassist otherwise.
     *
     * @param interfaceClass
     * @return
     */
    protected String[] methods(Class<?> interfaceClass) {
        boolean isNative = getEnvironment().getConfiguration().getBoolean(NATIVE, false);
        if (isNative) {
            return Arrays.stream(interfaceClass.getMethods()).map(Method::getName).toArray(String[]::new);
        } else {
            return ClassUtils.getMethodNames(interfaceClass);
        }
    }
    protected Environment getEnvironment() {
        return getScopeModel().getModelEnvironment();
    }