zbchi opened a new pull request, #3069:
URL: https://github.com/apache/dubbo-go/pull/3069

   when users configured
   ``` go
   dubbo.WithTag("newtag")
   ```
   Tag was not written into metadata.
   As a result, registries could not see the tag field, and tag router rules 
could not match services by tag.
   
   ## What’s Changed
   
   This PR adds a built-in tagCustomizer under common/extension/customizer/,
   which automatically injects dubbo.tag into the instance metadata during 
service export
   ``` go
   if instance.GetTag() != "" {
       instance.GetMetadata()[constant.Tagkey] = instance.GetTag()
   }
   ```
   
   
   This ensures the tag value appears in the registry metadata, for example:
   
   
   Before
   ```
   
dubbo.metadata-service.url-params={"group":"dubbo_registry_nacos_server","port":"43775","protocol":"dubbo"}
   dubbo.metadata.storage-type=local
   id=172.20.10.3:20000
   meta-v=1.0.0
   ```
   After
   ```
   
dubbo.metadata-service.url-params={"group":"dubbo_registry_nacos_server","port":"43775","protocol":"dubbo"}
   dubbo.metadata.storage-type=local
   id=172.20.10.3:20000
   meta-v=1.0.0
   dubbo.tag=newtag
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to