Skip to content

Commit

Permalink
Lenient span hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Darbord committed Oct 28, 2024
1 parent e0712fc commit d0866be
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Famix-OpenTelemetry-Importer/OTelQuery.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ OTelQuery >> removeSpan: span [
span trace: nil.
span context: nil.
parent := span parent.
span children do: [ :child | child parent: parent ].
span children do: [ :child |
child ifNotNil: [ child parent: parent ] ].
span parent: nil.
span mooseModel remove: span
]
Expand Down
9 changes: 9 additions & 0 deletions src/Famix-OpenTelemetry-Importer/OTelTopNQuery.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Class {
#name : 'OTelTopNQuery',
#superclass : 'OTelQuery',
#instVars : [
'count'
],
#category : 'Famix-OpenTelemetry-Importer',
#package : 'Famix-OpenTelemetry-Importer'
}
5 changes: 2 additions & 3 deletions src/Famix-OpenTelemetry-Importer/OTelZipkinLoader.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ OTelZipkinLoader >> loadSpan: rawSpan [
tags: (rawSpan at: 'tags');
timestamp: (rawSpan at: 'timestamp');
duration: (rawSpan at: 'duration').
rawSpan
at: 'parentId'
ifPresent: [ :pid | span parent: (entityDict at: pid) ].
rawSpan at: 'parentId' ifPresent: [ :pid |
entityDict at: pid ifPresent: [ :parent | span parent: parent ] ].
^ entityDict at: span id put: span
]

Expand Down

0 comments on commit d0866be

Please sign in to comment.