Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct trace name resolution (jaegertracing#541)
* Trace name resolution by root span with remote ref 1. Find all spans without parent reference or with a parent reference that is not found in the trace 2. Sort all found spans by start time (in case when there are more than one span found) 3. Take first of the found spans and get a trace name Signed-off-by: Valerii Varankin <[email protected]> * Unit tests for getTraceName() method * Test for trace without root span * Test for trace with exactly one root span (with remote ref) * Test for trace with exactly one root span (with no refs) * Test for trace with more than one root span Signed-off-by: Valerii Varankin <[email protected]> * trace-viewer to .tsx * File extension changed to .tsx * Path to changed file removed from tsconfig.lint.json * Added type for spans argument in getTraceName() Signed-off-by: Valerii Varankin <[email protected]> * Year fix Fixed a year in a copyright text Signed-off-by: Valerii Varankin <[email protected]> * Variable rename Renamed variable from "remoteSpanId" to "missingSpanId" Signed-off-by: Valerii Varankin <[email protected]> * Timestamp constant Made a constant with base span's timestamp in a tests Signed-off-by: Valerii Varankin <[email protected]> * Spans id array to spans dictionary Usage of dictionary of all spans instead of id's array to check an inclusion Signed-off-by: Valerii Varankin <[email protected]> * Correct sort logic Correction of a spans sorting to such order: 1. First, sort spans by a presence of a parent 2. Second, sort spans by a start time Signed-off-by: Valerii Varankin <[email protected]> * Tests for a new sorting logic * Test for a trace with multiple root spans different by parents * Test for a trace with multiple root spans different by start time Signed-off-by: Valerii Varankin <[email protected]> * Empty process object to all test spans Added a process key with an empty object to all test spans to avoid reading property of undefined Signed-off-by: Valerii Varankin <[email protected]> * Update Copyright text in packages/jaeger-ui/src/model/trace-viewer.tsx Co-Authored-By: Yuri Shkuro <[email protected]> Signed-off-by: Valerii Varankin <[email protected]> * Update Copyright text in packages/jaeger-ui/src/model/find-trace-name.test.js Co-Authored-By: Yuri Shkuro <[email protected]> Signed-off-by: Valerii Varankin <[email protected]> * More detailed comment for root span Co-Authored-By: Yuri Shkuro <[email protected]> Signed-off-by: Valerii Varankin <[email protected]> * Note about a loop Co-Authored-By: Yuri Shkuro <[email protected]> Signed-off-by: Valerii Varankin <[email protected]> * Change of parents definition logic Method of parents definition changed to comparing traceIDs of spans Signed-off-by: Valerii Varankin <[email protected]> * Tests correction according to changed logic Tests traces data was changed to fit parents definition method by a traceIDs Signed-off-by: Valerii Varankin <[email protected]> * Checking of parent span presence Added a checking of parent span presence among all trace's spans Signed-off-by: Valerii Varankin <[email protected]> * Tests correction according to changed logic Tests traces data was changed according to changed logic Signed-off-by: Valerii Varankin <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: vvvprabhakar <[email protected]>
- Loading branch information