Search in sources :

Example 31 with ServiceType

use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.

the class ApplicationServerTypeResolver method resolve.

public ServiceType resolve() {
    ServiceType resolvedApplicationServerType;
    if (this.defaultType == ServiceType.UNDEFINED) {
        resolvedApplicationServerType = this.resolver.resolve();
        logger.info("Resolved ApplicationServerType : {}", resolvedApplicationServerType.getName());
    } else {
        resolvedApplicationServerType = this.defaultType;
        logger.info("Configured ApplicationServerType : {}", resolvedApplicationServerType.getName());
    }
    return resolvedApplicationServerType;
}
Also used : ServiceType(com.navercorp.pinpoint.common.trace.ServiceType)

Example 32 with ServiceType

use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.

the class ServerBuilder method buildLogicalServer.

/**
     * filled with application information of physical server and service instance
     *
     * @param hostHistogram
     */
public ServerInstanceList buildLogicalServer(final AgentHistogramList hostHistogram) {
    ServerInstanceList serverInstanceList = new ServerInstanceList();
    for (AgentHistogram agentHistogram : hostHistogram.getAgentHistogramList()) {
        final String instanceName = agentHistogram.getId();
        final String hostName = getHostName(agentHistogram.getId());
        final ServiceType serviceType = agentHistogram.getServiceType();
        final ServerInstance serverInstance = new ServerInstance(hostName, instanceName, serviceType.getCode());
        serverInstanceList.addServerInstance(serverInstance);
    }
    return serverInstanceList;
}
Also used : ServiceType(com.navercorp.pinpoint.common.trace.ServiceType) AgentHistogram(com.navercorp.pinpoint.web.applicationmap.rawdata.AgentHistogram)

Example 33 with ServiceType

use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.

the class AgentTimeHistogram method createResponseTimeViewModel.

public List<ResponseTimeViewModel> createResponseTimeViewModel(List<TimeHistogram> timeHistogramList) {
    final List<ResponseTimeViewModel> value = new ArrayList<>(5);
    ServiceType serviceType = application.getServiceType();
    HistogramSchema schema = serviceType.getHistogramSchema();
    value.add(new ResponseTimeViewModel(schema.getFastSlot().getSlotName(), getColumnValue(SlotType.FAST, timeHistogramList)));
    //        value.add(new ResponseTimeViewModel(schema.getFastErrorSlot().getSlotName(), getColumnValue(SlotType.FAST_ERROR, timeHistogramList)));
    value.add(new ResponseTimeViewModel(schema.getNormalSlot().getSlotName(), getColumnValue(SlotType.NORMAL, timeHistogramList)));
    //        value.add(new ResponseTimeViewModel(schema.getNormalErrorSlot().getSlotName(), getColumnValue(SlotType.NORMAL_ERROR, timeHistogramList)));
    value.add(new ResponseTimeViewModel(schema.getSlowSlot().getSlotName(), getColumnValue(SlotType.SLOW, timeHistogramList)));
    //        value.add(new ResponseTimeViewModel(schema.getSlowErrorSlot().getSlotName(), getColumnValue(SlotType.SLOW_ERROR, timeHistogramList)));
    value.add(new ResponseTimeViewModel(schema.getVerySlowSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW, timeHistogramList)));
    //        value.add(new ResponseTimeViewModel(schema.getVerySlowErrorSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW_ERROR, timeHistogramList)));
    value.add(new ResponseTimeViewModel(schema.getErrorSlot().getSlotName(), getColumnValue(SlotType.ERROR, timeHistogramList)));
    return value;
}
Also used : HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema) ServiceType(com.navercorp.pinpoint.common.trace.ServiceType) AgentResponseTimeViewModel(com.navercorp.pinpoint.web.view.AgentResponseTimeViewModel) ResponseTimeViewModel(com.navercorp.pinpoint.web.view.ResponseTimeViewModel)

Example 34 with ServiceType

use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.

the class RpcURLPatternFilter method accept.

@Override
public boolean accept(List<SpanBo> fromSpanList) {
    for (SpanBo spanBo : fromSpanList) {
        List<SpanEventBo> spanEventBoList = spanBo.getSpanEventBoList();
        if (spanEventBoList == null) {
            return REJECT;
        }
        for (SpanEventBo event : spanEventBoList) {
            final ServiceType eventServiceType = serviceTypeRegistryService.findServiceType(event.getServiceType());
            if (!eventServiceType.isRpcClient()) {
                continue;
            }
            if (!eventServiceType.isRecordStatistics()) {
                continue;
            }
            //                http://api.domain.com/test/ArticleList.do
            //                slice url ->/test/ArticleList.do
            final List<AnnotationBo> annotationBoList = event.getAnnotationBoList();
            if (annotationBoList == null) {
                continue;
            }
            for (AnnotationBo annotationBo : annotationBoList) {
                //                    TODO ?? url format & annotation type detect
                int key = annotationBo.getKey();
                if (isURL(key)) {
                    String url = (String) annotationBo.getValue();
                    String path = getPath(url);
                    final boolean match = matcher.match(urlPattern, path);
                    if (match) {
                        return ACCEPT;
                    }
                }
            }
        }
    }
    return REJECT;
}
Also used : AnnotationBo(com.navercorp.pinpoint.common.server.bo.AnnotationBo) ServiceType(com.navercorp.pinpoint.common.trace.ServiceType) SpanBo(com.navercorp.pinpoint.common.server.bo.SpanBo) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo)

Aggregations

ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)34 Test (org.junit.Test)5 SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)4 SpanEventBo (com.navercorp.pinpoint.common.server.bo.SpanEventBo)4 Application (com.navercorp.pinpoint.web.vo.Application)3 HistogramSchema (com.navercorp.pinpoint.common.trace.HistogramSchema)2 NodeHistogram (com.navercorp.pinpoint.web.applicationmap.histogram.NodeHistogram)2 ResponseTimeViewModel (com.navercorp.pinpoint.web.view.ResponseTimeViewModel)2 ApplicationTypeDetector (com.navercorp.pinpoint.bootstrap.plugin.ApplicationTypeDetector)1 Buffer (com.navercorp.pinpoint.common.buffer.Buffer)1 FixedBuffer (com.navercorp.pinpoint.common.buffer.FixedBuffer)1 AgentInfoBo (com.navercorp.pinpoint.common.server.bo.AgentInfoBo)1 AnnotationBo (com.navercorp.pinpoint.common.server.bo.AnnotationBo)1 SpanChunkBo (com.navercorp.pinpoint.common.server.bo.SpanChunkBo)1 DefaultServiceTypeRegistryService (com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService)1 ServiceTypeRegistryService (com.navercorp.pinpoint.common.service.ServiceTypeRegistryService)1 ServiceTypeInfo (com.navercorp.pinpoint.common.trace.ServiceTypeInfo)1 ServiceTypeRegistry (com.navercorp.pinpoint.common.trace.ServiceTypeRegistry)1 TraceMetadataLoader (com.navercorp.pinpoint.common.trace.TraceMetadataLoader)1 TraceMetadataProvider (com.navercorp.pinpoint.common.trace.TraceMetadataProvider)1