code: public static String[] segmentTags(String qualifiedSegmentName) {
          Preconditions.checkNotNull(qualifiedSegmentName);
          String[] tags = {TAG_SCOPE, null, TAG_STREAM, null, TAG_SEGMENT, null, TAG_EPOCH, null};
          if (qualifiedSegmentName.contains(TABLE_SEGMENT_DELIMITER)) {
              String[] tokens = qualifiedSegmentName.split(TABLE_SEGMENT_DELIMITER);
              tags[1] = tokens[0];
              tags[3] = TABLES;
              tags[5] = tokens[1];
              tags[7] = "0";
              return tags;
          }
  
          String segmentBaseName = getSegmentBaseName(qualifiedSegmentName);
          String[] tokens = segmentBaseName.split("[/]");
          int segmentIdIndex = tokens.length == 2 ? 1 : 2;
          if (tokens[segmentIdIndex].contains(EPOCH_DELIMITER)) {
              String[] segmentIdTokens = tokens[segmentIdIndex].split(EPOCH_DELIMITER);
              tags[5] = segmentIdTokens[0];
              tags[7] = segmentIdTokens[1];
          } else {
              tags[5] = tokens[segmentIdIndex];
              tags[7] = "0";
          }
  
          if (tokens.length == 3) {
              tags[1] = tokens[0];
              tags[3] = tokens[1];
          } else {
              tags[1] = "default";
              tags[3] = tokens[0];
          }
          return tags;
      }
docs: Generate segment tags (string array) on the input fully qualified segment name to be associated with a metric.
  @param qualifiedSegmentName fully qualified segment name.
  @return string array as segment tag of metric.