/** * {@inheritDoc} */ @Override public void asyncSpanContextCreated(SpanContextImpl spanContextImpl) { if (null != spanContextImpl) { InvocationSequenceData invocationSequenceData = threadLocalInvocationData.get(); if (null != invocationSequenceData) { SpanIdent spanIdent = SpanContextTransformer.transformSpanContext(spanContextImpl); invocationSequenceData.setSpanIdent(spanIdent); } } }
invocationSequenceData.setSpanIdent(span.getSpanIdent());
InvocationSequenceData createSequence(Span span) { InvocationSequenceData data = new InvocationSequenceData(); data.setId(idSequence++); if (span != null) { data.setSpanIdent(span.getSpanIdent()); } data.setTimeStamp(new Timestamp(timeSequence++)); return data; }
invocationSequenceData.setSpanIdent(SpanContextTransformer.transformSpanContext(tracer.getCurrentContext()));
/** * Clones invocation sequence. This method returns new object exactly same as the original * object, but with out nested sequences set. * * @return Cloned invocation sequence. */ public InvocationSequenceData getClonedInvocationSequence() { InvocationSequenceData clone = new InvocationSequenceData(this.getTimeStamp(), this.getPlatformIdent(), this.getSensorTypeIdent(), this.getMethodIdent()); clone.setId(this.getId()); clone.setSpanIdent(this.getSpanIdent()); clone.setChildCount(this.getChildCount()); clone.setDuration(this.getDuration()); clone.setEnd(this.getEnd()); clone.setNestedSequences(Collections.<InvocationSequenceData> emptyList()); clone.setParameterContentData(this.getParameterContentData()); clone.setParentSequence(this.getParentSequence()); clone.setPosition(this.getPosition()); clone.setSqlStatementData(this.getSqlStatementData()); clone.setTimerData(this.getTimerData()); clone.setExceptionSensorDataObjects(this.getExceptionSensorDataObjects()); clone.setStart(this.getStart()); clone.setNestedSqlStatements(this.isNestedSqlStatements()); clone.setNestedExceptions(this.isNestedExceptions()); clone.setLoggingData(this.getLoggingData()); clone.setApplicationId(this.getApplicationId()); clone.setBusinessTransactionId(this.getBusinessTransactionId()); return clone; }