public Tuple2<String, Boolean> format(String serviceName, String endpointName) {
        Tuple2<String, Boolean> formattedName = new Tuple2<>(endpointName, Boolean.FALSE);
        if (endpointGroupingRule4Openapi != null) {
            formattedName = formatByOpenapi(serviceName, endpointName);
        }

        if (!formattedName._2() && endpointGroupingRule != null) {
            formattedName = formatByCustom(serviceName, endpointName);
        }

        if (!formattedName._2() && quickUriGroupingRule != null) {
            formattedName = formatByQuickUriPattern(serviceName, endpointName);

            Map<String, Queue<String>> svrHttpUris =
                cachedHttpUris.computeIfAbsent(serviceName, k -> new ConcurrentHashMap<>());

            // Only cache first N (determined by maxHttpUrisNumberPerService) URIs per 30 mins.
            if (svrHttpUris.size() < maxHttpUrisNumberPerService) {
                if (formattedName._2()) {
                    // Algorithm side should not return a pattern that has no {var} in it else this
                    // code may accidentally retrieve the size 1 queue created by unformatted endpoint
                    // The queue size is 10, which means only cache the first 10 formatted names.
                    final Queue<String> formattedURIs = svrHttpUris.computeIfAbsent(
                        formattedName._1(), k -> new ArrayBlockingQueue<>(10));
                    // Try to push the raw URI as a candidate of formatted name.
                    formattedURIs.offer(endpointName);
                } else {
                    svrHttpUris.computeIfAbsent(endpointName, k -> new ArrayBlockingQueue<>(1));
                }
            }
        }

        // If there are too many unformatted URIs, we will abandon the unformatted URIs to reduce
        // the load of OAP and storage.
        final var unformattedUrisOfService = unformattedHttpUrisCache.getUnchecked(serviceName);
        if (!formattedName._2()) {
            if (unformattedUrisOfService.size() < maxHttpUrisNumberPerService) {
                unformattedUrisOfService.add(endpointName);
            } else {
                formattedName = new Tuple2<>(ABANDONED_ENDPOINT_NAME, true);
            }
        } else {
            unformattedUrisOfService.remove(endpointName);
        }

        return formattedName;
    }
Format the endpoint name according to the API patterns.

@param serviceName  service name
@param endpointName endpoint name to be formatted.
@return Tuple2 The result of endpoint name formatting.
The first element is the formatted name or original name when not formatted.
The second element is a boolean represented the endpoint name is formatted or not.
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/config/group/EndpointNameGrouping.java