Tabnine Logo
Trace
Code IndexAdd Tabnine to your IDE (free)

How to use
Trace
in
com.springsource.insight.intercept.trace

Best Java code snippets using com.springsource.insight.intercept.trace.Trace (Showing top 20 results out of 315)

origin: com.springsource.insight.plugins/insight-plugin-servlet

@Override
public Frame getScoringFrame(Trace trace) {
  Frame    root=trace.getRootFrame();
  if (validateScoringFrame(root) == null) {
    return null;
  } else {
    return root;
  }
}
origin: com.springsource.insight.plugins/insight-plugin-spring-web

  @Override    // if ANY remote invocation failed, then declare the trace an error
  public Collection<Frame> locateFrames(Trace trace) {
    return trace.getAllFramesOfType(HttpInvokerRequestExecutorExternalResourceAnalyzer.HTTP_INVOKER);
  }
}
origin: com.springsource.insight/insight-repo

public DuplicateTraceException(Trace trace) {
  super("Unable to add a trace which has already been added (app=" + trace.getAppName() + ", traceId=" + trace.getId() + ")");
  appName = trace.getAppName();
  traceId = trace.getId();
}

origin: com.springsource.insight/insight-repo

  throw new RuntimeException("Error serializing trace", e);
PersistedTrace persistedTrace = new PersistedTrace(trace.getId(), new Time(trace.getDate()), traceBytes);
traceDao.storeTrace(persistedTrace);
    throw new InsightRuntimeException("Unable to store trace[" + trace.getId() + "] from server [" + trace.getServer() + "]: It depends on " +
                     "resource [" + resourceKey.getKey() + "] which can't be found");
    summary = new PersistedTraceSummary(trace.getLabel(), persistedTrace.getTraceId(),
                                 trace.getRange(), errors.size(), errorText(errors),
                                 persistedTags, trace.getServer(), trace.getAppName(),
                                 endPoint.getEndPointName());
    summary = new PersistedTraceSummary(trace.getLabel(), persistedTrace.getTraceId(),
        trace.getRange(), errors.size(), errorText(errors),
        persistedTags, trace.getServer(), trace.getAppName(), extResource.getEndPointKey().getEndPointName(), 
        extResource.getExternalName(), extResource.getExternalType(), extResource.getHost(), extResource.getPort(), extResource.getVendor(), 
        extResource.isIncoming(),extResource.getDestination(), extResource.getParent(), extResource.isParent());
origin: com.springsource.insight/insight-common

public List<TraceTag> findTags(TraceTagRuleContext context) {
  boolean hasError = context.hasError();
  
  long traceMillis = context.getTrace().getRange().getDurationMillis();
  if (hasError || traceMillis >= frustratedMillis) {
    return FRUSTRATED_LIST;
  } else if (traceMillis <  thresholdMillis) {
    return SATISFIED_LIST;
  } else {
    return TOLERATING_LIST;
  }
}
origin: com.springsource.insight/insight-common

public TraceAnalysis(Trace traceValue, ServerResource sourceServer, EndPointAnalysis endPoint,
           Collection<Resource> extResources,
           Collection<TraceError> traceErrors,
           Collection<TraceTag> tags) {
  ServerName    srcName=sourceServer.getServer();
  ServerName    trcName=traceValue.getServer();
  if (!ObjectUtil.typedEquals(srcName, trcName)) {
    throw new IllegalArgumentException("Trace server name (" + trcName + ") does not match the source server (" + srcName + ")");
  }
  this.trace = traceValue;
  this.server = sourceServer;
  this.endPointAnalysis = endPoint;
  this.externalResources = extResources;
  // Create a new TimeRange from the existing one. If the endPoint has a
  // SelfTimeRange the additional fields will be culled out as an optimization
  // for memory.
  this.responseTime = traceValue.getRange();
  this.responseTimePoint = dataPointFromRange(responseTime);
  this.resources = new HashMap<ResourceType, Resource>();
  this.traceTags = (ListUtil.size(tags) > 0) ? new HashSet<TraceTag>(tags) : new HashSet<TraceTag>();
  this.errors = (ListUtil.size(traceErrors) > 0) ? new ArrayList<TraceError>(traceErrors) : new ArrayList<TraceError>();
  this.applicationMetadata = ApplicationMetadataCache.getInstance();
  addResources();
}
origin: com.springsource.insight/insight-common

final ApplicationName appName = trace.getAppName();
final ServerName srvName = trace.getServer();        
boolean	multipleFrames = false;
Collection<? extends ExternalResourceDescriptor> externalRes=extresList;
origin: com.springsource.insight/insight-common

private Map<ResourceType, Resource> addResources() {
  TraceSource traceSource = trace.getTraceSource();
  ApplicationName    appName=trace.getAppName();
  String             applicationLabel=applicationMetadata.getLabel(appName);
  ApplicationResource application = new ApplicationResource(appName.makeKey(), applicationLabel);
  ApplicationEndPointResource endpoint = new ApplicationEndPointResource(appName,
                                      endPointAnalysis.getEndPointName(),
                                      endPointAnalysis.getResourceLabel(),
                                      traceSource);
  resources.put(APPLICATION, application);
  resources.put(SERVER, server);
  resources.put(APPLICATION_SERVER, new ApplicationServerResource(application, server));
  resources.put(APPLICATION_END_POINT, endpoint);
  resources.put(APPLICATION_SERVER_END_POINT, new ApplicationServerEndPointResource(application, server, endpoint, traceSource));
  return resources;
}
origin: com.springsource.insight/insight-common

public TraceAnalysis analyze(TraceInterface traceAccess) {
  Trace            trace=traceAccess.asTrace();
  ApplicationName trcName=traceAccess.getAppName(), appName=applicationMetadata.getApplicationName(trcName);
  
  TraceSource traceSource = sourceAnalysisService != null ? sourceAnalysisService.locateTraceSource(traceAccess)
                               :
                               null;
  trace.setTraceSource(traceSource);
  
  if (!ObjectUtil.typedEquals(trcName, appName)) {
    if (logger.isDebugEnabled()) {
      logger.debug("analyze(" + trace + ") modified application " + trcName + " => " + appName);
    }
    trace.setAppName(appName);
  }
  EndPointAnalysis         endPointAnalysis=locateEndPoint(traceAccess);
  Collection<Resource>    extResources=collectExternalResources(traceAccess, endPointAnalysis);
  List<TraceError>        errors=locateErrors(trace);
  ServerName                serverName=(traceAccess instanceof ServerNameCarrier)
                ? ((ServerNameCarrier) traceAccess).getServer()
                : trace.getServer()
                ;
  ServerResource             server=serverResolver.resolve(serverName);
  TraceAnalysis             res=new TraceAnalysis(trace, server, endPointAnalysis, extResources, errors, null);
  Set<TraceTag>            tags=locateTags(traceAccess, 
                        (EndPointAwareResource) res.getResource(ResourceType.APPLICATION_SERVER_END_POINT),
                        ListUtil.size(errors) > 0);
  res.addTags(tags);
  return res;
}
origin: com.springsource.insight.dispatch/insight-dispatch-core

Trace prepareTraceForTransport (Trace trace) {
  ServerName  traceServer=trace.getServer();
  // override only if not set or default
  if ((traceServer == null) || InterceptConfiguration.PLACEHOLDER_SERVER.equals(traceServer)) {
    DispatchConfiguration   dispatchConfig=DispatchConfiguration.getInstance();
    ServerName              agentName=dispatchConfig.getServerName();
    trace.setServer(agentName);
  }
  
  return trace;
  
}

origin: com.springsource.insight.dispatch/insight-dispatch-core

public TraceId getId() {
  Trace    t=getTrace();
  return (t == null) ? null : t.getId();
}
origin: com.springsource.insight/insight-common

public TraceReport(Trace trace, TraceInterface traceAccess) {
  this((trace == null) ? null /* cause exception */ : trace.getServer(), traceAccess);
}
origin: com.springsource.insight.dispatch/insight-dispatch-core

public ApplicationName getAppName() {
  Trace    t=getTrace();
  return (t == null) ? null : t.getAppName();
}
origin: com.springsource.insight.plugins/insight-plugin-servlet

@Override
public Collection<Frame> locateFrames(Trace trace) {
  Frame frame = trace.getFirstFrameOfType(getOperationType());
  if (frame == null) {
    return Collections.emptyList();
  } else {
    return Collections.singletonList(frame);
  }
}
origin: com.springsource.insight.dispatch/insight-dispatch-core

public TraceSource getTraceSource() {
  return trace.getTraceSource();
}
origin: com.springsource.insight.dispatch/insight-dispatch-core

public Date getDate() {
  Trace    t=getTrace();
  return (t == null) ? null : t.getDate();
}
origin: com.springsource.insight.plugins/insight-plugin-spring-web

@Override
public List<MetricsBag> generateMetrics(Trace trace, ResourceKey endpointResourceKey, Collection<Frame> frames) {
  if (ListUtil.size(frames) <= 0) {
    return Collections.emptyList();
  }
  int	totalErrors=0;
  for (Frame frame : frames) {
    Operation    op=frame.getOperation();
    Number        errorsCount=op.get(ValidationJoinPointFinalizer.ERRORS_COUNT, Number.class);
    int			numErrors=(errorsCount == null) ? 0 : errorsCount.intValue();
    if (numErrors <= 0) {
      continue;
    } else {
      totalErrors += numErrors;
    }
  }
  if (totalErrors <= 0) {
    return Collections.emptyList();
  }
  MetricsBag    mb=MetricsBag.create(endpointResourceKey, trace.getRange());
  addCounterMetricToBag(trace, mb, METRIC_KEY, totalErrors);
  return Collections.singletonList(mb);
}
origin: com.springsource.insight/insight-common

public List<Command> processTrace(TraceInterface traceAccess) {
  Trace    trace=traceAccess.asTrace();
  if (filter.filters(traceAccess)) {
    if (log.isDebugEnabled()) {
      log.debug("Trace [" + trace.getId() + "] was filtered");
    }
    return Collections.emptyList();
  }
  TraceAnalysis analysis = analyzer.analyze(traceAccess);          
  List<Command> commands = commandGenerator.generateCommands(analysis);
  List<Command> metricGeneratorsCommands = metricsGenerators.generateCommands(traceAccess, analysis);
  commands.addAll(metricGeneratorsCommands);
  // TODO: Aggregation of some commands (increment) could happen here
  return commands;
}
origin: com.springsource.insight.plugins/insight-plugin-run-exec

static Frame resolveEndPointFrame (Trace trace) {
  Frame       execFrame=trace.getFirstFrameOfType(RunExecDefinitions.EXEC_OP),
        runFrame=trace.getFirstFrameOfType(RunExecDefinitions.RUN_OP);
  Operation   opExec=(execFrame == null) ? null : execFrame.getOperation(),
        opRun=(runFrame == null) ? null : runFrame.getOperation();
  if (opExec == null) {
    if (opRun == null) {
      return null;
    } else {
      return runFrame;
    }
  } else if (opRun == null) {
    return execFrame;
  }
  // at this stage we have 2 frames - prefer the one higher up the trace
  int execDepth = FrameUtil.getDepth(execFrame), runDepth = FrameUtil.getDepth(runFrame);
  if (execDepth < runDepth) {
    return execFrame;
  } else {
    return runFrame;
  }
}
origin: com.springsource.insight/insight-common

TraceSource traceSource = trace.getTraceSource();
com.springsource.insight.intercept.traceTrace

Most used methods

  • getRange
  • getRootFrame
  • getAllFramesOfType
  • getAppName
  • getId
  • getServer
  • getDate
  • getFirstFrameOfType
  • getTraceSource
  • addExternalResourceKeys
  • getEndpoint
  • getLabel
  • getEndpoint,
  • getLabel,
  • getTimestamp,
  • isSensitive,
  • isTraceSourceAnalysisRequired,
  • newInstance,
  • setAppName,
  • setEndpoint,
  • setServer,
  • setTraceSource

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now