private static void addMethodPathAndService(Builder<Tag> tagListBuilder, RequestOnlyLog log,
                                                RequestHeaders requestHeaders) {
        final String methodName;
        final String serviceName;
        final String path;

        final Invocation invocation = InvocationUtil.getInvocation(log);
        if (invocation != null) {
            final Method method = invocation.method();
            methodName = method.getName();
            serviceName = method.getDeclaringClass().getName();
            path = getPathFromMethod(method);
        } else {
            methodName = requestHeaders.method().name();
            serviceName = NONE;
            path = requestHeaders.path();
        }

        tagListBuilder.add(Tag.of("method", methodName));
        tagListBuilder.add(Tag.of("path", path));
        tagListBuilder.add(Tag.of("service", serviceName));
    }
Returns a newly created {@link RetrofitMeterIdPrefixFunction} with the specified {@code name}.
retrofit2/src/main/java/com/linecorp/armeria/client/retrofit2/RetrofitMeterIdPrefixFunction.java