| commit | 922b54b1a3ad6f310c325bbf31381bce5afb6502 | [log] [tgz] |
|---|---|---|
| author | Geneviève Bastien <gbastien+lttng@versatic.net> | Thu Nov 12 10:44:33 2020 -0500 |
| committer | Genevieve Bastien <gbastien+lttng@versatic.net> | Mon Nov 16 15:05:34 2020 -0500 |
| tree | 0f280b7f70e9e2490a916760dce653badf6abf99 | |
| parent | 624bef8496c11be4c7b2c2eb01379e02969adbbb [diff] |
opentracing: Add span to root if parent not found If the quark for a parent span ID does not exist, add the span at the child span at the root of the trace's span instead of returning. Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net> Change-Id: Ia290e2d33f08499db65965d484e0f02a2bdc12e8 Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/172157 Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org> Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
diff --git a/tracetypes/org.eclipse.tracecompass.incubator.opentracing.core/src/org/eclipse/tracecompass/incubator/internal/opentracing/core/analysis/spanlife/SpanLifeStateProvider.java b/tracetypes/org.eclipse.tracecompass.incubator.opentracing.core/src/org/eclipse/tracecompass/incubator/internal/opentracing/core/analysis/spanlife/SpanLifeStateProvider.java index 02c05c9..db2f4c6 100644 --- a/tracetypes/org.eclipse.tracecompass.incubator.opentracing.core/src/org/eclipse/tracecompass/incubator/internal/opentracing/core/analysis/spanlife/SpanLifeStateProvider.java +++ b/tracetypes/org.eclipse.tracecompass.incubator.opentracing.core/src/org/eclipse/tracecompass/incubator/internal/opentracing/core/analysis/spanlife/SpanLifeStateProvider.java
@@ -109,7 +109,8 @@ } else { Integer parentQuark = fSpanMap.get(refId); if (parentQuark == null) { - return; + // We don't have the parent span, just start this span at root + parentQuark = openTracingSpansQuark; } spanQuark = ss.getQuarkRelativeAndAdd(parentQuark, name + '/' + spanId + '/' + errorTag + '/' + processName); }