Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static void callBack(final List<String> bpIds,
.map(TracePointConfig::getId).collect(Collectors.joining(","));
final Closeable span;
if (!spans.isEmpty()) {
span = span(filename + lineNo, spans);
span = span(filename + "#" + lineNo, spans);
} else {
span = null;
}
Expand All @@ -158,6 +158,9 @@ private static ICallbackResult commonCallback(final List<String> tracepointIds,
final IFactory factory,
final CallbackHook callbackHook) {
if (tracepointIds.isEmpty()) {
if (callbackHook != null) {
callbackHook.close(Callback.PUSH_SERVICE);
}
return null;
}
final long[] lineStart = Utils.currentTimeNanos();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class TracePointConfig {
public static final String COLLECT = "collect";

/**
* This type tells Deep to not collect any data and not to send the sanpshot.
* This type tells Deep to not collect any data and not to send the snapshot.
*/
public static final String NO_COLLECT = "no_collect";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ public ISpan createSpan(final String name) {
}

final Span span = deep.spanBuilder(name).setAttribute("deep", DeepVersion.VERSION).startSpan();
if (span == null) {
return null;
}

return new ISpan() {
@Override
public String name() {
Expand All @@ -104,25 +108,17 @@ public String name() {

@Override
public String traceId() {
if (span != null) {
return span.getSpanContext().getTraceId();
}
return null;
return span.getSpanContext().getTraceId();
}

@Override
public String spanId() {
if (span != null) {
return span.getSpanContext().getSpanId();
}
return null;
return span.getSpanContext().getSpanId();
}

@Override
public void addAttribute(final String key, final String value) {
if (span != null) {
span.setAttribute(key, value);
}
span.setAttribute(key, value);
}

@Override
Expand Down