public static void registerMemoryUsageTracking(String name, Object value, String metricInfixQueries,
                                                   SiddhiAppContext siddhiAppContext,
                                                   MemoryUsageTracker memoryUsageTracker) {
        String metricName = siddhiAppContext.getSiddhiContext().getStatisticsConfiguration().getMetricPrefix() +
                SiddhiConstants.METRIC_DELIMITER + SiddhiConstants.METRIC_INFIX_SIDDHI_APPS +
                SiddhiConstants.METRIC_DELIMITER + siddhiAppContext.getName() + SiddhiConstants.METRIC_DELIMITER +
                SiddhiConstants.METRIC_INFIX_SIDDHI + SiddhiConstants.METRIC_DELIMITER +
                metricInfixQueries + SiddhiConstants.METRIC_DELIMITER +
                name + SiddhiConstants.METRIC_DELIMITER + "memory";
        boolean matchExist = false;
        for (String regex : siddhiAppContext.getIncludedMetrics()) {
            if (metricName.matches(regex)) {
                matchExist = true;
                break;
            }
        }
        if (matchExist) {
            memoryUsageTracker.registerObject(value, metricName);
        }
    }
Helper method to clean/refactor MetaStreamEvent.

@param metaStreamEvent MetaStreamEvent
modules/siddhi-core/src/main/java/io/siddhi/core/util/parser/helper/QueryParserHelper.java