private void appendSearchableTags(SpanObject span) {
        span.getTagsList().forEach(tag -> {
            if (searchableTagKeys.getSearchableTags().contains(tag.getKey())) {
                final Tag spanTag = new Tag(tag.getKey(), tag.getValue());
                if (tag.getValue().length()  > Tag.TAG_LENGTH || spanTag.toString().length() > Tag.TAG_LENGTH) {
                    if (log.isDebugEnabled()) {
                        log.debug("Segment tag : {} length > : {}, dropped", spanTag, Tag.TAG_LENGTH);
                    }
                    return;
                }
                if (!segment.getTags().contains(spanTag)) {
                    segment.getTags().add(spanTag);
                }
            }
        });
    }
SegmentSpanListener forwards the segment raw data to the persistence layer with the query required conditions.
oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/SegmentAnalysisListener.java