SourceArgs adds InstanceMetaRelabel field to configure how to relabel instance metadata. The source implementation needs to be able to map the original metadata Key in the instance to the TargetKey, using the value of the Key as the value of the TargetKey by default, and remapping the value of the Key to another value as the value of the TargetKey if necessary. When the TargetKey already exists, it is possible to overwrite or skip this relabel according to the Overwrite parameter.
Note: pr provides an implementation for nacos source only.
examle:
Use the value of namingPrefix in the service instance metadata to concatenate the original service name above as the service name of the converted SE;
If the metadata namingPrefix does not exist , use the value of the metadata env instead;
If the value of env is prod, expand it to product.
SourceArgs
addsInstanceMetaRelabel
field to configure how to relabel instance metadata. The source implementation needs to be able to map the original metadataKey
in the instance to theTargetKey
, using the value of theKey
as the value of theTargetKey
by default, and remapping the value of theKey
to another value as the value of theTargetKey
if necessary. When theTargetKey
already exists, it is possible to overwrite or skip this relabel according to theOverwrite
parameter.Note: pr provides an implementation for nacos source only.
examle:
namingPrefix
in the service instance metadata to concatenate the original service name above as the service name of the converted SE;namingPrefix
does not exist , use the value of the metadataenv
instead;env
isprod
, expand it toproduct
.