Pre-check

  • [X] I am sure that all the content I provide is in English.

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

dubbo:
  application:
    name: ${spring.application.name}-dubbo
    id: ${spring.application.name}-dubbo
    register-mode: instance
    logger: slf4j
    owner: shen
    organization: vn
    environment: @dubbo.environment@
    shutwait: 60000
    meta-data:
      hostname4: ${HOSTNAME:localhost}
    parameters:
      hostname5: ${HOSTNAME:localhost}
  protocol:
    id: dubbo
    name: dubbo
    port: -1
    serialization: hessian2
  registry:
    address: nacos://@nacos.server@
    meta-data:
      hostname3: ${HOSTNAME:localhost}
    parameters:
      hostname2: ${HOSTNAME:localhost}
  config-center:
    address: nacos://@nacos.server@
  metadata-report:
    address: nacos://@nacos.server@
    parameters:
      hostname1: ${HOSTNAME:localhost}
  scan:
    base-packages: com.xxx
  consumer:
    check: false
  provider:
    threads: 500
    delay: 10000
  metrics:
    protocol: prometheus

I user the code above try to set extra metadata 'hostname', but it dose not work. So how to set extra metadata

Steps to reproduce this issue

use the dubbo config above

What you expected to happen

I want to set extra metadata

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • [ ] Yes I am willing to submit a pull request on my own!

Code of Conduct

Comment From: AlbumenJ

Why do you want to do it?

Comment From: luger1990

Why do you want to do it?

eg: I want to set hostname into metadata, so I can know which server the service runs on. spring cloud can support this feature, so I hope dubbo can support too.

Comment From: AlbumenJ

You can specify it in dubbo.provider.parameters