/** * Creates {@link ClientSpan} or {@link ServerSpan} based on the information from the given * {@link SpanImpl}. * * @param spanImpl * opentracing span impl * @return {@link AbstractSpan} */ private static AbstractSpan createCorrectSpanType(SpanImpl spanImpl) { if (spanImpl.isClient()) { ClientSpan clientSpan = new ClientSpan(); return clientSpan; } else { ServerSpan serverSpan = new ServerSpan(); return serverSpan; } }
ClientSpan clientSpan = new ClientSpan(); clientSpan.setSpanIdent(spanIdent); invocationSequenceHook.addDefaultData(clientSpan);
invocationSequenceHook.beforeBody(methodId2, sensorTypeId, object, parameters, rsc); AbstractSpan span = new ClientSpan(); span.setSpanIdent(new SpanIdent(1, 2)); invocationSequenceHook.addDefaultData(span);
ClientSpan createClientSpan(Span parent) { ClientSpan span = new ClientSpan(); span.setSpanIdent(new SpanIdent(idSequence++, 0)); span.setTimeStamp(new Timestamp(timeSequence++)); span.setPropagationType(PropagationType.PROCESS); if (parent != null) { span.setParentSpanId(parent.getSpanIdent().getId()); } return span; }