private void appendTags(Struct metadata) {
        final Map<String, Value> fieldsMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
        fieldsMap.putAll(metadata.getFieldsMap());
        if (log.isDebugEnabled()) {
            log.debug("Metadata field map: {}", fieldsMap);
        }
        final List<KeyValue> tags = new ArrayList<>();
        if (fieldsMap.containsKey("NAME")) {
            tags.add(new KeyValue("pod", fieldsMap.get("NAME").getStringValue()));
        }
        if (fieldsMap.containsKey("NAMESPACE")) {
            tags.add(new KeyValue("namespace", fieldsMap.get("NAMESPACE").getStringValue()));
        }
        if (log.isDebugEnabled()) {
            log.debug("Converted tags: {}", tags);
        }
        if (!tags.isEmpty()) {
            this.setTags(tags);
        }
    }
The same functionality with {@link ServiceMetaInfoAdapter#ServiceMetaInfoAdapter(com.google.protobuf.ByteString)}.

@param metadata the {@link Struct struct} to adapt from.
oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/mx/ServiceMetaInfoAdapter.java