private static MeterEntity buildMeterEntity(List<Sample> samples,
                                                    EntityDescription entityDescription) {
            switch (entityDescription.getScopeType()) {
                case SERVICE:
                    ServiceEntityDescription serviceEntityDescription = (ServiceEntityDescription) entityDescription;
                    return MeterEntity.newService(
                        InternalOps.dim(samples, serviceEntityDescription.getServiceKeys(), serviceEntityDescription.getDelimiter()),
                        serviceEntityDescription.getLayer()
                    );
                case SERVICE_INSTANCE:
                    InstanceEntityDescription instanceEntityDescription = (InstanceEntityDescription) entityDescription;
                    Map<String, String> properties = null;
                    if (instanceEntityDescription.getPropertiesExtractor() != null) {
                        properties = instanceEntityDescription.getPropertiesExtractor().call(samples.get(0).labels);
                    }
                    return MeterEntity.newServiceInstance(
                        InternalOps.dim(samples, instanceEntityDescription.getServiceKeys(), instanceEntityDescription.getServiceDelimiter()),
                        InternalOps.dim(samples, instanceEntityDescription.getInstanceKeys(), instanceEntityDescription.getInstanceDelimiter()),
                        instanceEntityDescription.getLayer(),
                        properties
                    );
                case ENDPOINT:
                    EndpointEntityDescription endpointEntityDescription = (EndpointEntityDescription) entityDescription;
                    return MeterEntity.newEndpoint(
                        InternalOps.dim(samples, endpointEntityDescription.getServiceKeys(), endpointEntityDescription.getDelimiter()),
                        InternalOps.dim(samples, endpointEntityDescription.getEndpointKeys(), endpointEntityDescription.getDelimiter()),
                        endpointEntityDescription.getLayer()
                    );
                case PROCESS:
                    final ProcessEntityDescription processEntityDescription = (ProcessEntityDescription) entityDescription;
                    return MeterEntity.newProcess(
                        InternalOps.dim(samples, processEntityDescription.getServiceKeys(), processEntityDescription.getDelimiter()),
                        InternalOps.dim(samples, processEntityDescription.getServiceInstanceKeys(), processEntityDescription.getDelimiter()),
                        InternalOps.dim(samples, processEntityDescription.getProcessKeys(), processEntityDescription.getDelimiter()),
                        InternalOps.dim(samples, List.of(processEntityDescription.getLayerKey()), processEntityDescription.getDelimiter())
                    );
                case SERVICE_RELATION:
                    ServiceRelationEntityDescription serviceRelationEntityDescription = (ServiceRelationEntityDescription) entityDescription;
                    final String serviceRelationComponentValue = InternalOps.dim(samples,
                        Collections.singletonList(serviceRelationEntityDescription.getComponentIdKey()), serviceRelationEntityDescription.getDelimiter());
                    int serviceRelationComponentId = StringUtil.isNotEmpty(serviceRelationComponentValue) ? Integer.parseInt(serviceRelationComponentValue) : 0;
                    return MeterEntity.newServiceRelation(
                        InternalOps.dim(samples, serviceRelationEntityDescription.getSourceServiceKeys(), serviceRelationEntityDescription.getDelimiter()),
                        InternalOps.dim(samples, serviceRelationEntityDescription.getDestServiceKeys(), serviceRelationEntityDescription.getDelimiter()),
                        serviceRelationEntityDescription.getDetectPoint(), serviceRelationEntityDescription.getLayer(), serviceRelationComponentId
                    );
                case PROCESS_RELATION:
                    final ProcessRelationEntityDescription processRelationEntityDescription = (ProcessRelationEntityDescription) entityDescription;
                    final String detectPointValue = InternalOps.dim(samples, Collections.singletonList(processRelationEntityDescription.getDetectPointKey()), processRelationEntityDescription.getDelimiter());
                    DetectPoint point = StringUtils.equalsAnyIgnoreCase(detectPointValue, "server") ? DetectPoint.SERVER : DetectPoint.CLIENT;
                    final String componentValue = InternalOps.dim(samples, Collections.singletonList(processRelationEntityDescription.getComponentKey()), processRelationEntityDescription.getDelimiter());
                    final int componentId = StringUtil.isNotEmpty(componentValue) ? Integer.parseInt(componentValue) : 0;
                    return MeterEntity.newProcessRelation(
                        InternalOps.dim(samples, processRelationEntityDescription.getServiceKeys(), processRelationEntityDescription.getDelimiter()),
                        InternalOps.dim(samples, processRelationEntityDescription.getInstanceKeys(), processRelationEntityDescription.getDelimiter()),
                        InternalOps.dim(samples, Collections.singletonList(processRelationEntityDescription.getSourceProcessIdKey()), processRelationEntityDescription.getDelimiter()),
                        InternalOps.dim(samples, Collections.singletonList(processRelationEntityDescription.getDestProcessIdKey()), processRelationEntityDescription.getDelimiter()),
                        componentId,
                        point
                    );
                default:
                    throw new UnexpectedException(
                        "Unexpected scope type of entityDescription " + entityDescription);
            }
        }
The parsing context holds key results more than sample collection.
oap-server/analyzer/meter-analyzer/src/main/java/org/apache/skywalking/oap/meter/analyzer/dsl/SampleFamily.java