@Override protected Span adjust(Span span) { if (applyTimestampAndDuration()) { return ApplyTimestampAndDuration.apply(span); } return span; }
BulkSpanIndexer indexSpans(BulkSpanIndexer indexer, List<Span> spans) throws IOException { for (Span span : spans) { Long timestamp = guessTimestamp(span); Long timestampMillis; String index; // which index to store this span into if (timestamp != null) { timestampMillis = TimeUnit.MICROSECONDS.toMillis(timestamp); index = indexNameFormatter.indexNameForTimestamp(timestampMillis); } else { timestampMillis = null; index = indexNameFormatter.indexNameForTimestamp(System.currentTimeMillis()); } indexer.add(index, span, timestampMillis); } return indexer; }
Long overridingTimestamp = authoritativeTimestamp(span); Long timestamp = overridingTimestamp != null ? overridingTimestamp : guessTimestamp(span);
span = ApplyTimestampAndDuration.apply(span); Long binaryAnnotationTimestamp = span.timestamp; if (binaryAnnotationTimestamp == null) { // fallback if we have no timestamp, yet
for (Span span : rawSpans) { Long timestamp = guessTimestamp(span); spans.add(span);
trace.add(raw ? rawSpan : ApplyTimestampAndDuration.apply(rawSpan));
Long timestamp = guessTimestamp(span); if (timestamp == null) continue; for (String partitionKey : index.partitionKeys(span)) {
trace.add(raw ? rawSpan : ApplyTimestampAndDuration.apply(rawSpan));
trace.add(raw ? rawSpan : ApplyTimestampAndDuration.apply(rawSpan));
span = ApplyTimestampAndDuration.apply(span); Long binaryAnnotationTimestamp = span.timestamp; if (binaryAnnotationTimestamp == null) { // fallback if we have no timestamp, yet
span = ApplyTimestampAndDuration.apply(span); Long binaryAnnotationTimestamp = span.timestamp; if (binaryAnnotationTimestamp == null) { // fallback if we have no timestamp, yet