/** * Returns span image based on propagation and reference type. * * @param span * Span * @param resourceManager * resource manager * @return image */ public static Image getSpanImage(Span span, ResourceManager resourceManager) { Image propagationImage = getPropagationImage(span.getPropagationType()); if (!span.isCaller() && !References.FOLLOWS_FROM.equals(span.getReferenceType())) { return propagationImage; } else { return getOverlayedImage(propagationImage, resourceManager, 1, getReferenceImage(span.getReferenceType())); } }
/** * Returns the full span details in form of StyledString. This method returns details if on of * these situations is matched: * * <ul> * <li>Propagation type is known for a span. * <li>Operation name exists as a tag. * <li>Method ident exists in the span. * </ul> * * @param span * {@link Span} * @param cachedDataService * Cached data service to load the method ident information from. * @return Returns {@link StyledString} if information in the span is enough or * <code>null</code> if details can not be constructed. */ public static StyledString getSpanDetailsFull(Span span, ICachedDataService cachedDataService) { return getSpanDetailsFull(span.isCaller(), span.getPropagationType(), span.getMethodIdent(), span.getTags(), cachedDataService); }
if (span.isCaller()) { table.addContentRow("Client:", null, new DetailsCellContent[] { new DetailsCellContent(InspectIT.getDefault().getImage(InspectITImages.IMG_CHECKMARK), "Yes") });
/** * Resolves a span element. * * @param parent * a {@link InvocationTreeElement} from type {@link TreeElementType#SPAN}. */ private void resolveSpan(InvocationTreeElement parent) { Span currentSpan = (Span) parent.getDataElement(); if (!currentSpan.isCaller()) { // server span - expect invocation sequence for (InvocationSequenceData data : invocationSequences) { if (InvocationSequenceDataHelper.hasSpanIdent(data) && data.getSpanIdent().equals(currentSpan.getSpanIdent())) { InvocationTreeElement child = createTreeElement(data, parent); resolveInvocationSequence(child); } } } for (Span span : spans) { // if span is already in the tree, skip it if (isSpanInTree(span.getSpanIdent())) { continue; } if (span.getParentSpanId() == currentSpan.getSpanIdent().getId()) { InvocationTreeElement child = createTreeElement(span, parent); resolveSpan(child); } } }
Span span = optionalSpan.get(); InvocationTreeElement child = null; if (span.isCaller()) {